IntelliJ Ultimate Yarn 需要 nodejs 4 或更高版本

IntelliJ Ultimate Yarn requires nodejs 4 or higher

我最近更改了我使用 nvm 安装的 nodejs 版本(我一直使用 nvm,它不是替换本机节点的新安装)。 Yarn 是最新的并且本机安装到

但是现在,当我尝试提交(或任何其他在 intellij 中使用节点的东西,如“运行”),我得到了这种错误

16:40   Commit failed with error
        0 file committed, 1 file failed to commit: feat(acl): fsdfsd
        Yarn requires Node.js 4.0 or higher to be installed.

好像是intellij或者yarn不能识别nodejs了...

知道发生了什么吗?提前致谢!

从 desktop/System menu/Toolbox 启动时,IDEA 只能看到在登录 shell 中配置的环境变量,但看不到交互式 shell 配置文件中的环境变量(例如 .bashrc.zshrc)。可能的解决方案:

  • 解决方法 1:通过将所需变量移动到相应的 shell 配置文件配置
  • ,使登录 shell 中可用的必需变量
  • 解决方法 2:运行 IDE 来自终端以使其继承终端环境

另见 https://youtrack.jetbrains.com/issue/IDEABKL-7589