Reputation: 21
Please some body can help me with this error?
Every thing was good, when suddenly I write npm index
and VS Code shows this error:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Debugger attached.
Unknown command: "index"
To see a list of supported npm commands, run:
npm help
What can I do to fix this?
Upvotes: 2
Views: 6198
Reputation: 15700
C:\Program Files\nodejs
npm.cmd
with notepad as adminprefix -g
with prefix --location=global
, and Savenpx.cmd
tooCheck if it is solved
If it is not solved, update npm
using the command npm install npm@latest -g
Upvotes: 2
Reputation: 1
This is due to the version problem of NPM. if you are using windows then you can follow this
prefix -g
with prefix --location=global
in all four filesAfter this Run this command
npm i latest-version
I'm on Windows and in my case, this worked. if not working then go through this post here you will get other solutions also npm-warn-config-global-post-Link
Upvotes: 0
Reputation: 21
I believe your goal was to start the application, right? If that's the case, replace npm
with node
.
Upvotes: 0