Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法

npm run dev运行起来报错 具体错误如下图,Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法_第1张图片![在这里插入图片描述](https://img-blog.csdnimg.cn/20190620224049468.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3UwMTQ2ODk3NjA=,size_16,color_FFFFFF,t_70
找到了BaseClient.js文件夹报错的地方,新的webpack已经不允许 import 和 module.exports 共存
Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法_第2张图片于是我看了一下package.json文件,发现webpack-dev-server这个有改动,变成了
Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法_第3张图片
于是我通过git查找出之前的版本,改了过来,在npm i重新安装,就可以跑起来了。
Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法_第4张图片

你可能感兴趣的:(webpack,vue,打包,错误,解决方法)