Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro 1.3.15 使用 Taro init 拉取ts模板 小程序直接报错 #4346

Closed
zkeyword opened this issue Aug 30, 2019 · 2 comments
Closed

Taro 1.3.15 使用 Taro init 拉取ts模板 小程序直接报错 #4346

zkeyword opened this issue Aug 30, 2019 · 2 comments

Comments

@zkeyword
Copy link

问题描述:
√ 拉取远程模板仓库成功!
? 请输入项目介绍!
? 是否需要使用 TypeScript ? Yes
? 请选择 CSS 预处理器(Sass/Less/Stylus) Stylus
? 请选择模板 默认模板 redux

复现步骤:
npm run dev:weapp

报错信息:
WAService.js:1 Uncaught Error: module "babel-runtime/core-js/object/get-prototype-of" is not defined
at require (WAService.js:1)
at WAService.js:1
at app.js:7
at require (WAService.js:1)
at :1:1
at HTMLScriptElement.scriptLoaded (appservice?t=1567149917964:1123)
at HTMLScriptElement.script.onload (appservice?t=1567149917964:1135)

VM276:1 根据 sitemap 的规则[0],当前页面 [pages/index/index] 将被索引
console.warn @ VM276:1
(anonymous) @ VM304:6
(anonymous) @ VM304:13
WAService.js:1 Page "pages/index/index" has not been registered yet

环境信息:

Taro CLI 1.3.15 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.9.1 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.10.2 - /usr/local/bin/npm
npmPackages:
@tarojs/components: 1.3.15 => 1.3.15
@tarojs/plugin-babel: 1.3.15 => 1.3.15
@tarojs/plugin-csso: 1.3.15 => 1.3.15
@tarojs/plugin-stylus: 1.3.15 => 1.3.15
@tarojs/plugin-uglifyjs: 1.3.15 => 1.3.15
@tarojs/router: 1.3.15 => 1.3.15
@tarojs/taro: 1.3.15 => 1.3.15
@tarojs/taro-alipay: 1.3.15 => 1.3.15
@tarojs/taro-h5: 1.3.15 => 1.3.15
@tarojs/taro-qq: 1.3.15 => 1.3.15
@tarojs/taro-quickapp: 1.3.15 => 1.3.15
@tarojs/taro-swan: 1.3.15 => 1.3.15
@tarojs/taro-tt: 1.3.15 => 1.3.15
@tarojs/taro-weapp: 1.3.15 => 1.3.15
@tarojs/webpack-runner: 1.3.15 => 1.3.15
eslint-config-taro: 1.3.15 => 1.3.15
eslint-plugin-taro: 1.3.15 => 1.3.15
nerv-devtools: ^1.4.0 => 1.4.4
nervjs: ^1.4.0 => 1.4.4
stylelint-config-taro-rn: 1.3.15 => 1.3.15
stylelint-taro-rn: 1.3.15 => 1.3.15
npmGlobalPackages:
typescript: 3.6.2

@taro-bot
Copy link

taro-bot bot commented Aug 30, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@zkeyword
Copy link
Author

zkeyword commented Sep 1, 2019

config/index.js 在babel 配置添加 'transform-runtime', 就可以解决问题 生成的模板没有'transform-runtime'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant