プログラミング勉強日記
2020年10月9日
nodistの環境でアプリを起動したときに警告が出てしまっていたのでそれの解決方法を記録する。
警告の内容
npm run devで実行すると以下のような警告が出てしまった。警告を無視しても動かすことはできた。
PS C:\Users\myblog> npm run dev
npm WARN lifecycle The node binary used for scripts is C:\Program Files (x86)\Nodist\bin\node.exe but npm is using C:\Program Files (x86)\Nodist\v-x64\12.18.4\node.exe itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> myblog@0.1.0 dev C:\Users\myblog
> next dev
解決方法
警告メッセージのところに--script-prepend-node-pathのオプションを使うとあるように使ったら見事に警告が消えた。
npm config set scripts-prepend-node-path true