执行npm run build 打包遇到问题如下:
1.npm ERR! Failed at the pms@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决: 升级webpack
命令:

  1. npm i uglifyjs-webpack-plugin@1.0.0 --save
    
  2.  npm i optimize-css-assets-webpack-plugin@2 --save
    

执行完后打包若还是
Error: Cannot find module ‘cssnano’
npm ERR! Failed at the pms@1.0.0 build script.
继续执行命令:

  1. npm install cssnano --save
    
  2.  npm install --save-dev extract-text-webpack-plugin@2.1.2
    
Logo

前往低代码交流专区

更多推荐