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 https://registry.npmjs.org/citeproc-js - 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

Details

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: '6.8.275.32-node.45',
  zlib: '1.2.11' }
$ node -p process.platform
linux

https://github.com/npm/cli/pull/132

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.