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.5升级到2.0版本后出现Error: Cannot find module 'babel-core' 报错该如何解决? #3279

Closed
w3cui opened this issue Jun 2, 2019 · 4 comments
Assignees

Comments

@w3cui
Copy link

w3cui commented Jun 2, 2019

错误信息如下

myApp@1.0.0 dev:weapp D:\项目\weixin_weapp\weixin-app-react
npm run build:weapp -- --watch

myApp@1.0.0 build:weapp D:\项目\weixin_weapp\weixin-app-react
taro build --type weapp "--watch"

👽 Taro v1.3.0-beta.6

开始编译项目 myApp
生成 工具配置 dist/project.config.json
编译 入口文件 src/app.tsx
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/dist/index.js
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/index.js
拷贝 NPM文件 dist/npm/@tarojs/redux/dist/index.js
拷贝 NPM文件 dist/npm/@tarojs/redux/index.js
{ Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\项目\weixin_weapp\weixin-app-react\node_modules_@tarojs_plugin-babel@1.2.26@@tarojs\plugin-babel\index.js:1:85)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3) code: 'MODULE_NOT_FOUND' }

@taro-bot
Copy link

taro-bot bot commented Jun 2, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@w3cui
Copy link
Author

w3cui commented Jun 2, 2019

我把taro-ui从1.5升级到2.0版本后出现Error: Cannot find module 'babel-core' 报错该如何解决?
我写错了标题

错误信息如下

myApp@1.0.0 dev:weapp D:\项目\weixin_weapp\weixin-app-react
npm run build:weapp -- --watch

myApp@1.0.0 build:weapp D:\项目\weixin_weapp\weixin-app-react
taro build --type weapp "--watch"

👽 Taro v1.3.0-beta.6

开始编译项目 myApp
生成 工具配置 dist/project.config.json
编译 入口文件 src/app.tsx
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/dist/index.js
拷贝 NPM文件 dist/npm/@tarojs/taro-weapp/index.js
拷贝 NPM文件 dist/npm/@tarojs/redux/dist/index.js
拷贝 NPM文件 dist/npm/@tarojs/redux/index.js
{ Error: Cannot find module 'babel-core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module.load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\项目\weixin_weapp\weixin-app-react\node_modules
@tarojs_plugin-babel@1.2.26@@tarojs\plugin-babel\index.js:1:85)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3) code: 'MODULE_NOT_FOUND' }

@taro-bot
Copy link

taro-bot bot commented Jun 2, 2019

CC @luckyadam

@luckyadam
Copy link
Member

应该是项目依赖没有装好,可以重新安装一下

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

4 participants