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 is using C:\somewhere\AppData\Roaming\npm\node_modules\node\bin\node.exe itself. Use the
--scripts-prepend-node-path
option to include the path for the node binary npm was executed with.
I understand it means my local version is diff from the one in the PATH variable (C:\Program Files...). How do proceed to tell it to use --scripts-prepend-node-path
?
I played a trick by replacing the C:\Program Files\nodejs
with C:\somewhere\AppData\Roaming\npm\node_modules\node\bin
in PATH variable, it does pick up that new node.exe got but there is no node binary in the current PATH
. Again recommend to use the --scrip
ts-prepend-node-path
option to include the path for the node binary npm was executed with