vue运行报错error:Cannot assign to read only property 'exports' of object '#'

用weex做项目的时候,npm start 之后一直报错error:Cannot assign to read only property 'exports' of object '#<Object>' ,查了好多资料好像是export和import共用了导致不兼容引起的

试了好多方法都不行,最后找到个办法,试了一下可以用,特此记录:

  npm install babel-plugin-transform-es2015-modules-commonjs

  然后在 babelrc中配置

  { "plugins": ["transform-es2015-modules-commonjs"] }

  即可解决


免责声明!

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



猜您在找 Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#' vue 项目启动报错:Cannot assign to read only property 'exports' of object '#' Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#' Vue的报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#' Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#‘的解决方法 Vue报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object 的解决方法 解决 Cannot assign to read only property 'exports' of object '#' 问题 Cannot assign to read only property 'exports' of object '#' Cannot assign to read only property 'exports' of object '#' Uncaught TypeError: Cannot assign to read only property 'exports' of object '#'
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM