Windows,VSC,Running npm start得到了这个
npm WARN生命周期用于脚本的节点二进制文件是C:\ Program Files \nodejs \node.exe,但是npm使用的是C:\ somewhere\AppData\Roaming \npm \node_modules \node\bin \node.exe本身.使用该
--scripts-prepend-node-path选项可以包含执行的节点二进制文件npm的路径.
我理解这意味着我的本地版本是PATH变量(C:\ Program Files ...)中的差异.如何继续告诉它使用--scripts-prepend-node-path?
我通过替换PATH变量中的C:\Program Files\nodejswith C:\somewhere\AppData\Roaming\npm\node_modules\node\bin来玩一个技巧,它确实获得了新的node.exe but there is no node binary in the current PATH.再次建议使用该--scrip
ts-prepend-node-path选项来包含执行的节点二进制文件npm的路径