vue 运行时报错: Cannot assign to read only property 'exports' of object 'Object'
2019-06-09 18:59
435 查看
vue运行报错error:Cannot assign to read only property ‘exports’ of object ‘#’
用weex做项目的时候,npm start 之后一直报错error:Cannot assign to read only property ‘exports’ of object ‘#’ ,查了好多资料好像是export和import共用了导致不兼容引起的
试了好多方法都不行,最后找到个办法,试了一下可以用,特此记录:
npm install babel-plugin-transform-es2015-modules-commonjs
然后在 babelrc中配置
{ “plugins”: [“transform-es2015-modules-commonjs”] }
即可解决
相关文章推荐
- vue引入插件Cannot assign to read only property 'exports' of object '#<Object>'
- vue引入插件Cannot assign to read only property 'exports' of object '#<Object>'
- Uncaught TypeError: Cannot assign to read only property 'exports' of object '#<Object>'
- vue报错: Cannot assign to read only property 'exports' of object '#<Object>'
- Cannot assign to read only property 'exports' of object '#<Object>' 解决方案
- Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法
- Cannot assign to read only property 'exports' of object '#<Object>' (mix require and export) #4039
- Hbuilder MUI运行出现Uncaught TypeError: Cannot read property '0' of undefined at js/mui.min.js:7
- vue项目中Error in render function: "TypeError: Cannot read property 'matched' of undefined"
- Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated
- Gradle自定义apk名称报错(Cannot set the value of read-only property 'outputFile' )
- vue 报错 data functions should return an object: 和 Cannot read property '__ob__' of undefined
- 关于Uncaught TypeError: Cannot read property 'toLowerCase' of undefined的问题
- Cannot read property 'component' of undefined 即vue-router 0.x转化为2.x
- Android Studio3.0报错:Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl
- Vue-router cannot read property _c of undefined
- Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
- Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated
- vuecli3+typescript 错误信息: TypeError: Cannot read property 'extend' of undefined
- Vue=Cannot read property 'validate' of undefined