-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 2.2.17 init模板编译报错 #9036
Comments
您的 Issue 没有按照规范从 Taro Issue Helper 创建,因此会被直接关闭。 维护开源项目是一项非常辛苦的工作,还请多多包涵。 |
@wangruiStart 还有其他的解决方案不 |
我刚从 2.2.15 升级到 2.2.17 也报这个错 |
结果悲剧了,再切回 2.2.15 也是报这个错。又要折腾了。。。 |
@taichenglu 我2.2.15 一直打包失败 |
安装 core-js 依赖可以临时解决问题。 |
@wangruiStart 我安装了core-js好像不行 |
结果悲剧了,再切回 2.2.15 也是报这个错。又要折腾了。。。 |
突然想到从其他项目把 node_modules 拷过来用,居然可以了,暂时用回 2.2.15 |
@wangruiStart 我装的core-js版本太低了,装core-js暂时可以解决,谢谢啦 |
安装了core-js 解决问题,多谢 |
版本升级遇到了同样的问题,希望官方尽快解决! |
安装了core-js 如果没有效果,说明你安装的不是3.0以上版本, npm i core-js@3 可以 |
相关平台
微信小程序
小程序基础库: 2.16.0
使用框架: React
复现步骤
taro cli版本升级至 2.2.17
taro init demo
npm run dev:weapp
期望结果
编译成功
实际结果
👽 Taro v2.2.17
生成 工具配置 /Users/wangrui/Desktop/未命名文件夹/weixin/dist/project.config.json
(node:12487) UnhandledPromiseRejectionWarning: Error: Cannot find module 'core-js/modules/es.string.replace.js'
Require stack:
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/wangrui/Desktop/未命名文件夹/weixin/node_modules/csso-webpack-plugin/lib/index.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Module._compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_pirates@4.0.1@pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Object.newLoader [as .js] (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_pirates@4.0.1@pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/Users/wangrui/Desktop/未命名文件夹/weixin/node_modules/@tarojs/mini-runner/dist/webpack/chain.js:7:31)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Module._compile (/usr/local/lib/node_modules/@tarojs/cli/node_modules/_pirates@4.0.1@pirates/lib/index.js:99:24)
(Use
node --trace-warnings ...
to show where the warning was created)(node:12487) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)(node:12487) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
环境信息
The text was updated successfully, but these errors were encountered: