当我使用yarn全局安装包时,我会看到错误“出现意外错误:"ENOENT:没有这样的文件或目录,chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'".现在,我使用nvm来控制我的节点版本。
我的系统是MacOs 10.15.3,节点版本是v10.15.0。
现在,我使用nvm来控制节点版本。
yarn global add umi# show error
yarn global v1.22.4
[1/4] ? Resolving packages...
[2/4] ? Fetching packages...
[3/4] ? Linking dependencies...
[4/4] ? Building fresh packages...
success Installed "umi@3.2.10" with binaries:
- umi
error An unexpected error occurred: "ENOENT: no such file or directory, chmod '/usr/local/opt/nvm/versions/node/v10.15.0/bin/umi'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/jokky/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.发布于 2020-07-28 15:48:16
我解决了这个问题。
首先,我打开文件.yarnrc。
添加下一行文本
prefix "/path/.config/yarn" 这个路径就是你的纱线下载路径
https://stackoverflow.com/questions/63107740
复制相似问题