webpack报错Module build failed: TypeError: fileSystem.statSync is not a function
2018-01-29 22:38
471 查看
跟着视频操作,删掉node_modules目录后,执行webpack报错
ERROR in ./src/js/index.js
Module build failed: TypeError: fileSystem.statSync is not a function
at module.exports (/Users/mac/source/9-01/node_modules/babel-loader/lib/utils/exists.js:7:25)
at find (/Users/mac/source/9-01/node_modules/babel-loader/lib/resolve-rc.js:13:9)
at Object.module.exports (/Users/mac/source/9-01/node_modules/babel-loader/lib/index.js:113:132)百度了一下,有人说是因为webpack版本不一致导致。所以重新安装了
npm install webpack --save-dev执行这一步时出现很多警告
ERROR in ./src/js/index.js
Module build failed: TypeError: fileSystem.statSync is not a function
at module.exports (/Users/mac/source/9-01/node_modules/babel-loader/lib/utils/exists.js:7:25)
at find (/Users/mac/source/9-01/node_modules/babel-loader/lib/resolve-rc.js:13:9)
at Object.module.exports (/Users/mac/source/9-01/node_modules/babel-loader/lib/index.js:113:132)百度了一下,有人说是因为webpack版本不一致导致。所以重新安装了
npm install webpack --save-dev执行这一步时出现很多警告
npm notice save webpack is being moved from dependencies to devDependencies npm WARN babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none is installed. You must install peer dependencies yourself. npm WARN slick-carousel@1.8.1 requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself. npm WARN 05-01@1.0.0 No description npm WARN 05-01@1.0.0 No repository field.大意为 babel-loader这个版本需要更高级的webpack,于是执行下面语句安装3.0版
npm install webpack@3.0.0 --save-dev再执行webpack就运行成功了。
相关文章推荐
- 【ReactJS 初体验】Module build failed: TypeError: fileSystem.statSync is not a function
- ajaxfileupload.js结合低版本jquery报异常:TypeError: jQuery.handleError is not a function
- Uncaught TypeError: $(...).customFileInput is not a function
- [置顶] 解决vux 引入组件时Error in render function: "TypeError: _vm.$t is not a function"问题
- jquery提交表单报错 Uncaught TypeError: s[y] is not a function
- jquery版本更新后无live函数的处理.TypeError: $(...).live is not a function
- Uncaught TypeError: xxx.submit is not a function解决方案
- JS报错 Uncaught TypeError: undefined is not a function,解决
- mongodb 添加用户报错TypeError:db.addUser is not a function (mongodb3.4.1)
- swagger1.2浏览器报错Uncaught TypeError: detectedType.toLowerCase is not a function
- Uncaught TypeError: sum is not a function
- uncaught typeerror, var test.match is not a function.
- 关于JavaScript一个错误 Uncaught TypeError: form.submit is not a function
- TypeError: db.collection is not a function
- TypeError: newRawData.forEach is not a function问题解决
- E QUERY [thread1] TypeError: db.foo.batchInsert is not a function :
- TypeError: $ is not a function when calling jQuery function
- 关于Jquery错误的解决:Uncaught TypeError: $.post is not a function
- Uncaught TypeError: b.ha(…).nb is not a function
- 浏览器报错 Uncaught TypeError: object is not a function