Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro 3.4.0 build alipay,上传支付宝工具平台,平台抛出压缩代码报错 #11142

Closed
jsjzh opened this issue Jan 19, 2022 · 2 comments
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@jsjzh
Copy link

jsjzh commented Jan 19, 2022

相关平台

支付宝小程序

小程序基础库: 2.0
使用框架: Vue 3

复现步骤

  1. 通过 taro build:alipay 生成产物
  2. 通过 miniu mini upload dist/alipay
  3. 报错 upload mini app error

期望结果

期望 miniu mini upload 上传成功

实际结果

miniu mini upload 上传失败,提示 upload mini app error

环境信息

$ npx taro info            


👽 Taro v3.4.0


  Taro CLI 3.4.0 environment info:
    System:
      OS: macOS 10.15.5
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
    npmPackages:
      @tarojs/cli: 3.4.0 => 3.4.0 
      @tarojs/components: 3.4.0 => 3.4.0 
      @tarojs/mini-runner: 3.4.0 => 3.4.0 
      @tarojs/runtime: 3.4.0 => 3.4.0 
      @tarojs/taro: 3.4.0 => 3.4.0 
      @tarojs/webpack-runner: 3.4.0 => 3.4.0 
      babel-preset-taro: 3.4.0 => 3.4.0 
      eslint-config-taro: 3.4.0 => 3.4.0 

补充信息

根据报错消息和支付宝小程序的 appId,我已经找了支付宝的开发拿来了具体报错信息,如下所示

03:06:23.567 - Failed to compile

03:06:23.568 - 压缩代码时报错,请检查node_modules中是否使用了ES6语法, ES6代码会导致 iOS9/iOS10 运行时白屏

出错位置: /tmp/data/onetime_tmp_dir/951a8397-4536-4ae4-84c7-8173659c66d3-1642561571311/tiny-Gyfxe1Ouo-1642561571335/main/index.worker.js:647:67687
错误信息: index.worker.js from UglifyJs
Unexpected token: name «property», expected: punc «,» [./vendors.js:1,2][index.worker.js:647,67687]

可以看到是 taro 生成的 vendors.js 在压缩代码的时候发生了错误

我也找 miniu 的开发得知,无法跳过压缩代码的标准步骤

@taro-bot2 taro-bot2 bot added F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x labels Jan 19, 2022
@Chen-jj
Copy link
Contributor

Chen-jj commented Jan 23, 2022

已在 #11133 下回复

@Chen-jj
Copy link
Contributor

Chen-jj commented Apr 12, 2022

#11133

@Chen-jj Chen-jj closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants