You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行npm start启动React项目时遇nodenv版本未安装错误

Fixing "nodenv: version `8.9.1' is not installed" Error When Starting React Projects

No worries, this is a super common nodenv hiccup—let’s get your React project up and running in just a few steps:

  • Install the required Node.js version first
    Your project’s .node-version file is telling nodenv to use Node 8.9.1, which isn’t on your system yet. Run this command in your terminal:

    nodenv install 8.9.1
    

    If you hit a compilation error (pretty common on macOS), make sure you have Xcode Command Line Tools installed first:

    xcode-select --install
    

    Follow the on-screen prompts to finish installing, then rerun the nodenv install command.

  • Update nodenv’s shims
    Once the version is installed, you need to let nodenv know it’s available. Run this to refresh its reference list:

    nodenv rehash
    
  • Confirm the correct version is active
    Head back to your React project directory and check the Node version with:

    node --version
    

    You should see v8.9.1 printed out. Now go ahead and run npm start—your project should launch without that nodenv error.

If you really don’t want to use Node 8.9.1, you can edit the .node-version file in your project root and replace 8.9.1 with a Node version you already have installed. Just keep in mind: the project was likely configured for 8.9.1, so this might lead to unexpected bugs later on.

内容的提问来源于stack exchange,提问作者Ishan Patel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:35:55