Julius Tan Julius Tan - 5 months ago 36
Node.js Question

npm init error: Invalid name: "donn&jul"

My

npm
version is
2.5.1
and my
node
version is
0.12.0
. When I try to run
npm init
, I get the following error:


npm ERR! Invalid name: "donn&jul"


Here is the screenshot: npm init error screenshot.

Why is this happening?

Answer

From https://docs.npmjs.com/files/package.json#name

"Any name with non-url-safe characters will be rejected."

I believe & is not url-safe.

Comments