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

> > ### 相关平台 #11944

Closed
WilsonLau0755 opened this issue Jun 16, 2022 · 1 comment
Closed

> > ### 相关平台 #11944

WilsonLau0755 opened this issue Jun 16, 2022 · 1 comment

Comments

@WilsonLau0755
Copy link

相关平台

H5
浏览器版本: chrome 使用框架: Vue 3

复现步骤

1、taro init初始化项目,选择Gitee中获取的默认模板进行项目初始化 2、在项目中taro build --type h5 --env development进行项目编译

期望结果

正常完成项目编译

实际结果

🙅 Failed to compile.
js/app.js from Terser TypeError: t.replace is not a function at Array.forEach ()

环境信息

  Taro CLI 3.3.19 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 16.11.1 - C:\nvm\nodejs\node.EXE
      npm: 8.0.0 - C:\nvm\nodejs\npm.CMD

补充信息

仅编译H5时加上--env development会报错。

找到解决方法了,config下的配置文件里把env相关配置去掉就可以了,真累,debug完全靠猜。

完全去掉env里面的配置?是将config -> dev.js 和 prod.js中的env下面的配置删掉吗?那不就没有了环境变量?没有环境变量那要--dev development这个命令干啥,直接npm run build:h5本来就能运行成功。

Originally posted by @WilsonLau0755 in #11467 (comment)

@taro-bot2
Copy link

taro-bot2 bot commented Jun 16, 2022

您的 Issue 没有按照规范从 Taro Issue Helper 创建,因此会被直接关闭。

维护开源项目是一项非常辛苦的工作,还请多多包涵。
了解为什么这么严格?

@taro-bot2 taro-bot2 bot closed this as completed Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant