初始化 yarn 报错了,包没找到?

[2/4] Fetching packages...
error https://registry.yarnpkg.com/smartwrap/-/s...: Extracting tar content of undefined failed, the file appears to be co
rrupt: "ENOENT: no such file or directory, open 'C:\Users\Administrator\AppData\Local\Yarn\Cache\v4\npm-smartwrap-1.0.10-873ef350d
4ee1262fed4a80a55634d86ae1faf48\node_modules\smartwrap\ejq'"
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 6

找了下 好像腾讯v1.7以上的都有这个问题,换成1.6 yarn 成功了 但是在git bash 上 提示 bash: wepy: command not found

5年前 评论
liyu001989

https://github.com/yarnpkg/yarn/issues/262... 不知道 用 npm 试试,删了 node_modules

5年前 评论

解决了 配置yarn 全局到path

5年前 评论

@liyu001989 V1.7以上 好像因为smartwrap依赖有问题,用yarn安装不了报错,官方issue也没维护,安装1.6成功了。
用npm全局可以按v1.7.3成功了,但是会报wepy 命令找不到,已经将npm root -g 全局path配置进环境变量了,不知道是什么原因?win7

5年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!