引用其他组件都好着呢一旦引入PopupPicker就报错?
Uncaught TypeError: Cannot assign to read only property 'exports' of object '#

修改文件:node_modules\vux\src\components\picker\animate.js
应该是第 42 行:module.exports = {,改为:export default {
修改文件:node_modules\vux\src\components\picker\scroller.js
应该是第 19 行:const Animate = require('./animate'),改为:import Animate from './animate'
问题解决了, 膜拜大佬。
- 修改文件:node_modules\vux\src\components\picker\animate.js
应该是第 42 行:module.exports = {,改为:export default {- 修改文件:node_modules\vux\src\components\picker\scroller.js
应该是第 19 行:const Animate = require('./animate'),改为:import Animate from './animate'
你好,想请问下,本地修改了这些依赖,到线上环境要怎么办呢?
那打包的时候怎么办
正常打包
正常打包
正常打包后线上还是这个错误
Most helpful comment
修改文件:node_modules\vux\src\components\picker\animate.js
应该是第 42 行:
module.exports = {,改为:export default {修改文件:node_modules\vux\src\components\picker\scroller.js
应该是第 19 行:
const Animate = require('./animate'),改为:import Animate from './animate'