vux 引入PopupPicker时报错?

Created on 30 Jan 2019  ·  7Comments  ·  Source: airyland/vux

引用其他组件都好着呢一旦引入PopupPicker就报错?

Uncaught TypeError: Cannot assign to read only property 'exports' of object '#'

Most helpful comment

  1. 修改文件:node_modules\vux\src\components\picker\animate.js
    应该是第 42 行:module.exports = {,改为:export default {

  2. 修改文件:node_modules\vux\src\components\picker\scroller.js
    应该是第 19 行:const Animate = require('./animate'),改为:import Animate from './animate'

All 7 comments

123

  1. 修改文件:node_modules\vux\src\components\picker\animate.js
    应该是第 42 行:module.exports = {,改为:export default {

  2. 修改文件:node_modules\vux\src\components\picker\scroller.js
    应该是第 19 行:const Animate = require('./animate'),改为:import Animate from './animate'

问题解决了, 膜拜大佬。

  1. 修改文件:node_modules\vux\src\components\picker\animate.js
    应该是第 42 行:module.exports = {,改为:export default {
  2. 修改文件:node_modules\vux\src\components\picker\scroller.js
    应该是第 19 行:const Animate = require('./animate'),改为:import Animate from './animate'

你好,想请问下,本地修改了这些依赖,到线上环境要怎么办呢?

那打包的时候怎么办

正常打包

正常打包

正常打包后线上还是这个错误

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GloriaCHL picture GloriaCHL  ·  4Comments

525729985 picture 525729985  ·  4Comments

RenShine picture RenShine  ·  4Comments

hao-li picture hao-li  ·  3Comments

iqiuye picture iqiuye  ·  4Comments