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

10,337

From the official NPM reference:

The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters.

I believe & is not url-safe.

Share:
10,337
Julius Tan
Author by

Julius Tan

Updated on June 04, 2022

Comments

  • Julius Tan
    Julius Tan almost 2 years

    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?

  • Julius Tan
    Julius Tan about 9 years
    Thanks for the quick reply!