【问题标题】:Homebrew upgrade yarn installed node while I've already using nvm自制升级纱线安装节点,而我已经在使用 nvm
【发布时间】:2019-08-21 16:06:54
【问题描述】:

我正在用自制软件升级我的纱线,我已经在使用 nvm,但是自制软件自动为我安装了节点 11。

当我输入 which node 时,我可以看到我仍在使用我的 nvm 版本的节点 8。

那么我该如何正确删除我安装的自制程序节点 11。

我知道我可以输入$ brew uninstall node,但是会有什么副作用吗?

我不能简单地输入$ brew uninstall node,它对我来说显示错误。

Error: Refusing to uninstall /usr/local/Cellar/node/11.12.0
because it is required by yarn, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies node

更新

当我使用yarn执行package.json脚本时,我用自制软件重新安装yarn后,它显示了这个错误:

npm WARN lifecycle The node binary used for scripts is 
/var/folders/yw/wsrk1t713x13_5q52_dgjy_80000gn/T/yarn--1554024356098-0.4116378701167074/node but npm is using 
/Users/wangzhiyong/.nvm/versions/node/v8.15.1/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary 
npm was executed with.

重新安装不起作用,我想我只是破坏了我的环境。????????????

【问题讨论】:

    标签: node.js homebrew yarnpkg


    【解决方案1】:

    试试这个:yarn config set scripts-prepend-node-path /usr/local/bin/node

    【讨论】:

      猜你喜欢
      • 2019-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多