npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead.

npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead.

I got this warning when I installed node.js from nvm and tried to check the npm version.

Use the where command to locate the node.

C:\Users\mtakahashi-h5>where node
C:\Program Files\nodejs\

Open the following files in this folder

npm
npm.cmd
npx
npx.cmd

Replace “prefix -g” with “prefix –location=global”.

The warning will now disappear.

コメント

Discover more from 株式会社CONFRAGE ITソリューション事業部

Subscribe now to keep reading and get access to the full archive.

Continue reading

Copied title and URL