运行 16-07 的源码出现以下问题
来源:16-7 个人评论列表开发(下)
liujings8
2017-11-25
出现问题:
ERROR in multi main Module not found: Error: Cannot resolve module 'babel-loader' in C:\Users\xxx\git\IMOOC-React\16-07 @ multi main
然后就安装了 babel-loader(最新版):
npm install babel-loader --save
然后运行:
webpack-dev-server --content-base src --inline --hot
出现以下报错:
ERROR in ./src/js/root.js Module build failed: TypeError: fileSystem.statSync is not a function at module.exports (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\utils\exists.js:7:25) at find (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\resolve-rc.js:13:9) at Object.module.exports (C:\Users\xxx\git\IMOOC-React\16-07\node_modules\babel-loader\lib\index.js:113:132) @ multi main
写回答
1回答
-
babel-loader 的版本安装的太高了,安装 6.0 版本即可。
npm install babel-loader@6.2.5 --save
即可解决。
022017-11-26
相似问题