Problem description
execute the NPM install command to install all dependencies, and then run NPM run dev to report an error:
error in ./node_modules/view-design/dist/styles/iview.css
Module build failed: Error: No PostCSS Config found in: /Users/lanweihong/Code/JS/hotel-pms/node_modules/view-design/dist/styles
at config.search.then (/Users/lanweihong/Code/JS/hotel-pms/node_modules/postcss-load-config/src/index.js:91:15)
at <anonymous>
Solution
create a new postcss.config.js file in the project root directory. Postcss.config.js is a special processing for webpack 3.0.
postcss.config.js
module.exports = {
plugins: {
'autoprefixer': {browsers: 'last 5 version'}
}
}
Rerun NPM run dev.
Read More:
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- [Solved] Vue installs postcss pxtorem Error: Syntax Error: Error: Loading PostCSS Plugin failed…
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [Solved] Module build failed: Error: Vue packages version mismatch
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- [Solved] Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [Solved] Error: postcss plugin autoprefixer requires postcss 8 error report problem repair
- vue.config.js build Package UglifyJsPlugin to clear console and print console.log Error: `warnings` is not a supported option
- [Solved] Vue Project Error: Module build failed: Error: Missing binding
- [Solved] Vue Import swiper.css Error: Module not found…
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- [Solved] Vue Error: Parsing error:No Babel config file detected for xxx
- [Solved] Vue Error: Parsing error: No Babel config file detected for /Users/Usename/xxx…
- [Solved] Vue Error: Parsing error: No Babel config file detected for
- Vue Start Error: This relative module was not found:
- [Solved] Vue Project Error: This relative module was not found
- [Solved] Vue Project startup error: no eslint configuration found
- [Solved] Vue item packaging error: Failed to load resource: the server responded with a status of 404 (Not Found)