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

后端 未结 4 960
天命终不由人
天命终不由人 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:22

    Like I said, replacing the actual path in PATH system variable didn't fix the problem completely, it still complained about binary is missing. Found this solved the there is no node binary in the current PATH problem. Restored the original PATH, tried it worked.

    Simply create a file at the root folder of the app, called .npmrc, place this line into it:

    scripts-prepend-node-path=true

提交回复
热议问题