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報錯:Uncaught TypeError: 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 '#' Vue 使用自定義組件時報錯:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#' [one day one question] webpack 打包報錯 Cannot assign to read only property 'exports' of object '#' 關於vue-cli3打包時遇到Cannot assign to read only property 'exports' of object '#'問題的解決方法。 vue-cli3 打包時使用‘babel-loader’遇到Cannot assign to read only property ‘exports’ of object '#'問題的解決方法。 Cannot assign to read only property 'className' of object '# ' Vue報錯:Vue ERROR TypeError: Cannot read property “upgrade” of undefined
 
粵ICP備18138465號   © 2018-2026 CODEPRJ.COM