vue项目build打包时遇到 Cannot read property 'compilation' of undefined 问题解决方法


TypeError: Cannot read property ‘compilation’ of undefined 错误。

(这里需要强调一下,安装环境的使用一定要-save-dev或者是-save,否则欲哭无泪啊)

很明显,这是node一些包的版本对应不上的问题。。。

查看package.jsonn里的webpack的版本号发现3.6.0 的版本,但是 optimize-css-assets-webpack-plugin 是2.0 的版本。

解决方法:

npm  install optimize-css-assets-webpack-plugin@3.2.0    将timize-css-assets-webpack-plugin版本替换掉


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 关于vue-cli3打包时遇到Cannot assign to read only property 'exports' of object '#'问题的解决方法。 webpack打包进行丑化压缩遇到(TypeError Cannot read property 'compilation' of undefined)问题 Vue+elementUI开发中 Cannot read property 'resetFields' of undefined 问题解决以及原因分析 vue TypeError: Cannot read property 'length' of undefined 问题解决思路 vue-cli3 打包时使用‘babel-loader’遇到Cannot assign to read only property ‘exports’ of object '#'问题的解决方法。 Vue使用Typescript开发编译时提示“ERROR in ./src/main.ts Module build failed: TypeError: Cannot read property 'afterCompile' of undefined”的解决方法 记一次前端问题解决历程(Cannot read Property 'call' of undefined) 记一次前端问题解决历程(Cannot read Property 'call' of undefined) [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM