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

v1.3.9 taro convert 失败 #3805

Closed
bdoycn opened this issue Jul 12, 2019 · 6 comments
Closed

v1.3.9 taro convert 失败 #3805

bdoycn opened this issue Jul 12, 2019 · 6 comments

Comments

@bdoycn
Copy link

bdoycn commented Jul 12, 2019

问题描述
taro convert 转换失败

期望行为
正确的转换

报错信息
assert.js:350
throw err;
^

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\templates\default\pkg
at EditionInterface.exports.copy (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules\mem-fs-editor\lib\actions\copy.js:48:3)
at EditionInterface.module.exports [as copyTpl] (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at Creator.template (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\dist\create\creator.js:56:17)
at Convertor.generateConfigFiles (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\dist\convertor\index.js:600:17)
at Convertor.run (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\dist\convertor\index.js:645:14)
at Object. (C:\Users\薄荷爱柠檬\AppData\Roaming\npm\node_modules@tarojs\cli\bin\taro-convert:12:11)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

Taro CLI 1.3.9 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.10.1 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

补充信息
初步判断是因为 v1.3.9 中 pkg 文件缺失,回退到 v1.3.8 后正常转换

@taro-bot
Copy link

taro-bot bot commented Jul 12, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@yuche
Copy link
Contributor

yuche commented Jul 15, 2019

源码

@yuche yuche added the taroize label Jul 15, 2019
@bdoycn
Copy link
Author

bdoycn commented Jul 15, 2019

源码

额, 这是整个项目转换失败, 不是单个文件报错 没法发源码呀...
我猜原因就是因为 \node_modules@tarojs\cli\templates\default\pkg 这个文件缺失
1.3.8 还在 1.3.9 就移除了

@yuche
Copy link
Contributor

yuche commented Jul 15, 2019

你先 init 一次 普通的项目,再转换试试看

@bdoycn
Copy link
Author

bdoycn commented Jul 17, 2019

你先 init 一次 普通的项目,再转换试试看

还是一样的错误

@yuche
Copy link
Contributor

yuche commented Aug 15, 2019

升级一下新版本可以了

@Chen-jj Chen-jj closed this as completed Jul 6, 2020
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

3 participants