npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Installing non-existent package says name is invalid

What I Wanted to Do

“Install” a package that doesn’t exist, and get the appropriate error message.

What Happened Instead

In the regular error message, I got another one:

npm ERR! code E404
npm ERR! 404 Not Found - GET - Not found
npm ERR! 404 
npm ERR! 404  'citeproc-js@latest' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because 
npm ERR! 404  1. name can only contain URL-friendly characters
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /[...]/.npm/_logs/2018-12-23T23_31_25_422Z-debug.log

2018-12-23T23_31_25_422Z-debug.log (1.6 KB)

Reproduction Steps

$ npm init -y
$ npm install citeproc-js # for example


I’ll look at this properly in the morning, just need a place to write it down now.

Platform Info

$ npm --versions
{ '108': '1.0.0',
  npm: '6.6.0-next.0',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.14.2',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform