I wanted to start a Node app and created a package.json file with a tutorial. Here is the json file:
{
\"name\": \"Dashboard\",
I resolved that problem just moving my project from E: to C:. I think it happened becouse nodejs and npm was installed in my C: and the project was in my E:
I ran into this problem after I cloned a git repository to a directory, renamed the directory, then tried to run npm install
. I'm not sure what the problem was, but something was bungled. Deleting everything, re-cloning (this time with the correct directory name), and then running npm install
resolved my issue.
For me it was the version. Yes, the line you put at the root, like :
{
"name": "your-project",
"version": "0.1"
...
}
Yes, npm doesn't like version like this, it prefers something like "0.0.1
".
Don't ask me why, I'll tell you it's totally stupid (or "how to loose time easily")
Verify user account, you are working on. If any system user has no permissions for installation packages, npm particulary also is showing this message.
My mistake was the I named the file packages.json
instead of package.json
This doesn't look like your issue, but for the sake of others, for me this was caused by an invalid version number in package.json (had to change 2.4 to 2.4.0).