How to include the path for the node binary npm was executed with

后端 未结 4 967
天命终不由人
天命终不由人 2021-01-30 03:06

Windows, VSC, Running npm start got this

npm WARN lifecycle The node binary used for scripts is C:\\Program Files\\nodejs\\node.exe but npm

4条回答
  •  逝去的感伤
    2021-01-30 03:40

    Having this issue in Visual Studio 2017, I instead told VS to always use the NodeJS that I had installed from nodejs.org rather than the frozen-in-time one that ships with Visual Studio. (The one that shipped with VS2015 is so ancient it doesn't really work anymore.)

    In Visual Studio, go to TOOLS > OPTIONS > search for EXTERNAL WEB TOOLS > and ensure "C:\Program Files\nodejs" (or wherever nodejs.org installed it) is first in the list of paths, adding it if necessary.

提交回复
热议问题