follow the video operation, delete node_modules directory, 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)
Baidu once, someone said because
webpack version inconsistency results. So reinstall
npm install webpack --save-dev
There are many warnings when performing this step
npm notice save webpack is being moved from dependencies to devDependencies
npm WARN [email protected] requires a peer of webpack@2 || 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
The babel-Loader version requires a more advanced WebPack, so execute the following statement to install version 3.0
npm install [email protected] --save-dev
Execute the WebPack and it will run successfully.
Read More:
- Vue — report error with less module build failed: typeerror: loaderContext.getResolve is not a function
- Using webpack to report typeerror: this.getresolve is not a function
- Webpack — module build failed: error: the node API for ‘Babel’ has been moved to Babel core
- How to Fix webpack Module build failed Error: The node API for ‘babel’ has been moved to babel-core
- Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The “path“ argument must be of type string.
- Vue project error: uncaught typeerror: vuex__ WEBPACK_ IMPORTED_ MODULE_ 1__ . default.store is not a constructor
- Webpack Upgrade Error: webpack.NamedModulesPlugin is not a constructor
- TypeError: this.getOptions is not a function
- NPX webpack cannot find module’html webpack plugin’a bug causes headache
- Module build failed: Error: Node Sass version 6.0.0 is incompatible with ^4.0.0.
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- Typeerror: ‘module’ object is not callable
- Module build failed: error: cannot find module ‘node sass’ error
- TypeError: connection.connect is not a function
- Run webpack error: Error: Cannot find module’webpack/lib/node/NodeTemplatePlugin’
- Error: Cannot find module ‘webpack/schemas/WebpackOptions.json’
- Front end project runtime prompts syntax error: typeerror: token.type.endswith is not a function solution
- [react+antd] Table Error: Unhandled Rejection (TypeError): data.slice is not a function
- TypeError: this.getOptions is not a function at Object.lessLoader
- JS error – typeerror: XXX is not a function