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 build --type h5 报错 js/app.588bd635.js from Terser TypeError: t.replace is not a function at Array.forEach (<anonymous>) #16159

Closed
alwaysRemember opened this issue Jul 25, 2024 · 2 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@alwaysRemember
Copy link

相关平台

H5

浏览器版本: chrome 126.0.6478.183
使用框架: React

复现步骤

直接运行 taro build --type h5 就会报错

期望结果

正常编译

实际结果

js/app.588bd635.js from Terser
TypeError: t.replace is not a function
at Array.forEach ()

环境信息

👽 Taro v3.6.34


  Taro CLI 3.6.34 environment info:
    System:
      OS: macOS 12.6
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
      Yarn: 1.22.21 - /usr/local/bin/yarn
      npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.34 => 3.6.34 
      @tarojs/components: 3.6.34 => 3.6.34 
      @tarojs/helper: 3.6.34 => 3.6.34 
      @tarojs/mini-runner: 3.6.34 => 3.6.34 
      @tarojs/plugin-framework-vue3: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-alipay: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-h5: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-jd: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-qq: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-swan: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-tt: 3.6.34 => 3.6.34 
      @tarojs/plugin-platform-weapp: 3.6.34 => 3.6.34 
      @tarojs/runtime: 3.6.34 => 3.6.34 
      @tarojs/shared: 3.6.34 => 3.6.34 
      @tarojs/taro: 3.6.34 => 3.6.34 
      @tarojs/webpack-runner: 3.6.34 => 3.6.34 
      babel-preset-taro: 3.6.34 => 3.6.34 
      eslint-config-taro: 3.6.34 => 3.6.34 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Jul 25, 2024
@github-project-automation github-project-automation bot moved this to Padding in H5 Jul 25, 2024
@github-project-automation github-project-automation bot moved this from Padding to Done in H5 Jul 25, 2024
This was referenced Jul 27, 2024
@feiying-tf
Copy link

feiying-tf commented Oct 26, 2024

这个问题解决了吗。我也遇到这个问题,很离奇的是把里面的内容拷贝到另外一个目录,又能正常构建h5。同时有问题的那个项目把里面pinia相关的东西注释掉以后也能构建h5

@alwaysRemember
Copy link
Author

这个问题解决了吗。我也遇到这个问题,很离奇的是把里面的内容拷贝到另外一个目录,又能正常构建h5。同时有问题的那个项目把里面pinia相关的东西注释掉以后也能构建h5

我这里解决方案是自己实现了一个轻量版pinia 查看下来是因为pinia造成的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Archived in project
Development

No branches or pull requests

2 participants