小程序转H5,编译成功,运行报错



  • Taro H5 编译成功,运行失败,Cannot assign to read only property 'exports' of object '#<Object>'
    74e43019-7e2e-4a73-af35-0e9b53f493c0-image.png

    env.js :
    6ad379a3-f0c3-46d7-9aad-aeef2a0fc5c5-image.png

    @三金



  • @左鱼子 附上taro info

    Taro CLI 2.0.1 environment info:
        System:
          OS: macOS 10.15.2
          Shell: 3.2.57 - /bin/bash
        Binaries:
          Node: 12.14.0 - /usr/local/bin/node
          Yarn: 1.21.1 - /usr/local/bin/yarn
          npm: 6.13.4 - /usr/local/bin/npm
        npmPackages:
          @tarojs/components: 2.0.1 => 2.0.1 
          @tarojs/components-qa: 2.0.1 => 2.0.1 
          @tarojs/mini-runner: 2.0.1 => 2.0.1 
          @tarojs/router: 2.0.1 => 2.0.1 
          @tarojs/taro: 2.0.1 => 2.0.1 
          @tarojs/taro-alipay: 2.0.1 => 2.0.1 
          @tarojs/taro-h5: 2.0.1 => 2.0.1 
          @tarojs/taro-qq: 2.0.1 => 2.0.1 
          @tarojs/taro-quickapp: 2.0.1 => 2.0.1 
          @tarojs/taro-rn: 2.0.1 => 2.0.1 
          @tarojs/taro-swan: 2.0.1 => 2.0.1 
          @tarojs/taro-tt: 2.0.1 => 2.0.1 
          @tarojs/taro-weapp: 2.0.1 => 2.0.1 
          @tarojs/webpack-runner: 2.0.1 => 2.0.1 
          eslint-config-taro: 2.0.1 => 2.0.1 
          eslint-plugin-taro: 2.0.1 => 2.0.1 
          nerv-devtools: ^1.5.6 => 1.5.6 
          nervjs: ^1.5.6 => 1.5.6 
          stylelint-config-taro-rn: 2.0.1 => 2.0.1 
          stylelint-taro-rn: 2.0.1 => 2.0.1 
        npmGlobalPackages:
          typescript: 3.7.4
     
    


  • 楼主如何解决的?



  • 用import/export


登录后回复