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

cli从V1.2.1升级v1.2.13报错 #2192

Closed
DuanShuaiShuai opened this issue Feb 18, 2019 · 3 comments
Closed

cli从V1.2.1升级v1.2.13报错 #2192

DuanShuaiShuai opened this issue Feb 18, 2019 · 3 comments

Comments

@DuanShuaiShuai
Copy link

问题描述
cli从V1.2.1升级v1.2.13报错

复现步骤
[复现问题的步骤]

  1. taro update self 升级cli
  2. taro update project 升级相关依赖
  3. npm run dev:swan
  4. See error
λ npm run dev:swan

> m-web-taro@1.0.0 dev:swan D:\project\m-web-taro
> npm run build:swan  -- --watch


> m-web-taro@1.0.0 build:swan D:\project\m-web-taro
> taro build --type swan "--watch"

👽 Taro v1.2.13

开始编译项目 taro-app
输入类型错误,目前只支持 weapp/h5/rn/swan/alipay/tt 六端类型

期望行为
编译正常

报错信息

目前只支持 weapp/h5/rn/swan/alipay/tt 六端类型

系统信息
👽 Taro v1.2.13

Taro CLI 1.2.13 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.9.4 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.5.0 - C:\Program Files\nodejs\npm.CMD

补充信息
[可选]
[根据你的调查研究,出现这个问题的原因可能在哪里?]

@taro-bot
Copy link

taro-bot bot commented Feb 18, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@DuanShuaiShuai
Copy link
Author

我在cli build.js,打印了两行console.log
function build(args, buildConfig) { console.log(buildConfig, '++++++++++++++++') const { type, watch } = buildConfig const outputPath = path.join(appPath, configDir.outputRoot || CONFIG.OUTPUT_DIR) if (!fs.existsSync(outputPath)) { fs.mkdirSync(outputPath) } else { if (type !== Util.BUILD_TYPES.H5) { Util.emptyDirectory(outputPath) } } console.log(type, '++++++++++++++++') switch (type) { case Util.BUILD_TYPES.H5: buildForH5({ watch }) break case Util.BUILD_TYPES.WEAPP: buildForWeapp({ watch }) break case Util.BUILD_TYPES.SWAN: buildForSwan({ watch }) break case Util.BUILD_TYPES.ALIPAY: buildForAlipay({ watch }) break case Util.BUILD_TYPES.TT: buildForTt({ watch }) break case Util.BUILD_TYPES.RN: buildForRN({ watch }) break case Util.BUILD_TYPES.UI: buildForUILibrary({ watch }) break default: console.log(chalk.red('输入类型错误,目前只支持 weapp/h5/rn/swan/alipay/tt 六端类型')) } }

结果`
λ npm run dev:swan

[email protected] dev:swan D:\project\m-web-taro
npm run build:swan -- --watch

[email protected] build:swan D:\project\m-web-taro
taro build --type swan "--watch"

👽 Taro v1.2.13

开始编译项目 taro-app
{ type: undefined, watch: undefined } '++++++++++++++++'
undefined '++++++++++++++++'
输入类型错误,目前只支持 weapp/h5/rn/swan/alipay/tt 六端类型`

@guozimo
Copy link

guozimo commented Mar 27, 2019

DuanShuaiShuai 企信宝开发者 请加我微信 谢谢 微信号:gwd1991

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

2 participants