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

dev模式正常,build模式编译出来运行不了 #12973

Closed
jasper-ops opened this issue Dec 13, 2022 · 2 comments · Fixed by #13055
Closed

dev模式正常,build模式编译出来运行不了 #12973

jasper-ops opened this issue Dec 13, 2022 · 2 comments · Fixed by #13055
Labels
F-vue3 Framework - Vue 3 T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@jasper-ops
Copy link

jasper-ops commented Dec 13, 2022

相关平台

支付宝小程序

复现仓库

https://github.com/daofeng-coder/taro-alipay-bug.git
小程序基础库: 1.25.9
使用框架: Vue 3

复现步骤

执行build编译,编译过程没问题,但是在开发工具上无法运行,会报错

期望结果

build编译出来能够正常运行

实际结果

出现两个错误

  1. VM189 index.html:3 d:\Work\小程序\alipay-test\dist\vendors.js: Unexpected token (1210:124)
    Please set enableNodeModuleBabelTransform to true or add "d:/Work/小程序/alipay-test/dist/vendors.js" to node_modules_es6_whitelist in mini.project.json for node_modules babel transform

  2. (index):6 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at (index):6:994
    at Array.forEach ()
    at g ((index):6:185)
    at m ((index):6:973)
    at M.init ((index):6:9020)
    at M.x ((index):6:2019)
    at new M ((index):6:4623)
    at y ((index):6:2076)
    at new ia ((index):6:7528)
    at new ha ((index):6:7309)

环境信息

👽 Taro v3.5.10


  Taro CLI 3.5.10 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.16.0 - D:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - D:\sfot-cache\npm\prefix\yarn.CMD
      npm: 8.11.0 - D:\Program Files\nodejs\npm.CMD


补充信息

dev模式正常运行,基础库2.8.x也试过,也不行,build编译出来就会报错
顺便再反馈个问题,为啥较新的Taro版本,v-html不支持video解析了?3.4.13都能解析

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

Chen-jj commented Dec 24, 2022

@daofeng-coder 原项目安装依赖后运行会遇到 swc 的报错,可能是依赖的问题,因此使用 3.5.10 新建了一个项目进行测试,最终是没有复现编译报错的问题。建议试试重新安装依赖或使用新项目测试一下。另外报错提示的是说还有 ES6 语法的问题,你也可以看看是哪些模块没有被 babel 编译。

@jsPeasant
Copy link

我3.6.0 build编译钉钉小程序也有问题1,去掉react-redux的Provider就正常

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

Successfully merging a pull request may close this issue.

3 participants