0

I have a private project that I do not want to publish. With node v17.3.0 and npm 8.3.0, I cannot achieve to display the outdated dependencies:

$ npm show --outdated
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/MYPROJECT - Not found
npm ERR! 404
npm ERR! 404  'MYPROJECT@latest' is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
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!     /path/to/2021-12-23T11_30_01_692Z-debug-0.log

My package.json is pretty common.

{
  "name": "MYPROJECT",
  "version": "1.0.0",
  "private": true,
  "licence": "UNLINCENSED",
  "devDependencies": {...},
  "dependencies": {...}
}

What am I missing?

azmeuk
  • 4,026
  • 3
  • 37
  • 64
  • can you say is there any error when you run this command? ```npm config set registry http://registry.npmjs.org``` – Mohsen Mahoski Dec 23 '21 at 11:41
  • https://stackoverflow.com/questions/39115101/getting-404-when-attempting-to-publish-new-package-to-npm this may be help you – Yong Yuan Jan 06 '22 at 10:23
  • 1
    Instead of `npm show --outdated` run `npm outdated` and see what happens. – code Jan 09 '22 at 04:43

1 Answers1

1

npm show is an alias for npm view. This command expects a package as an argument and searches it in the NPM registry. Here's what it outputs when I run npm view eslint (coloured):

eslint@8.6.0 | MIT | deps: 38 | versions: 294
An AST-based pattern checker for JavaScript.
https://eslint.org

keywords: ast, lint, javascript, ecmascript, espree

bin: eslint

dist
.tarball: https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz
.shasum: 4318c6a31c5584838c1a2e940c478190f58d558e
.integrity: sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==
.unpackedSize: 2.7 MB

dependencies:
@eslint/eslintrc: ^1.0.5            debug: ^4.3.2                       eslint-utils: ^3.0.0                fast-deep-equal: ^3.1.3             ignore: ^4.0.6
@humanwhocodes/config-array: ^0.9.2 doctrine: ^3.0.0                    eslint-visitor-keys: ^3.1.0         file-entry-cache: ^6.0.1            import-fresh: ^3.0.0
ajv: ^6.10.0                        enquirer: ^2.3.5                    espree: ^9.3.0                      functional-red-black-tree: ^1.0.1   imurmurhash: ^0.1.4
chalk: ^4.0.0                       escape-string-regexp: ^4.0.0        esquery: ^1.4.0                     glob-parent: ^6.0.1                 is-glob: ^4.0.0
cross-spawn: ^7.0.2                 eslint-scope: ^7.1.0                esutils: ^2.0.2                     globals: ^13.6.0
(...and 14 more.)

maintainers:
- openjsfoundation <npm@openjsf.org>
- eslintbot <nicholas+eslint@nczconsulting.com>
- nzakas <nicholas@nczconsulting.com>
- ivolodin <ivolodin@gmail.com>

dist-tags:
es6jsx: 0.11.0-alpha.0  latest: 8.6.0           next: 8.0.0-rc.0

published a week ago by eslintbot <nicholas+eslint@nczconsulting.com>

If none is given, then it searches for the current one. Yours isn't published, hence the error you get.

npm outdated is the correct way to find dependencies that are out-of-date. This will output:

Package                                    Current    Wanted  Latest  Location                                                Depended by
@types/chai                                 4.2.22     4.3.0   4.3.0  node_modules/@types/chai                                MYPROJECT
@types/jquery                                3.5.6    3.5.12  3.5.12  node_modules/@types/jquery                              MYPROJECT
@types/node                                16.10.3  16.11.19  17.0.8  node_modules/@types/node                                MYPROJECT
@typescript-eslint/eslint-plugin             5.0.0     5.9.1   5.9.1  node_modules/@typescript-eslint/eslint-plugin           MYPROJECT
@typescript-eslint/parser                    5.0.0     5.9.1   5.9.1  node_modules/@typescript-eslint/parser                  MYPROJECT
eslint                                       8.0.0     8.6.0   8.6.0  node_modules/eslint                                     MYPROJECT
mocha                                        9.1.2     9.1.3   9.1.3  node_modules/mocha                                      MYPROJECT
ts-node                                     10.3.0    10.4.0  10.4.0  node_modules/ts-node                                    MYPROJECT
typescript                                   4.4.3     4.5.4   4.5.4  node_modules/typescript                                 MYPROJECT
uglify-js                                   3.14.2    3.14.5  3.14.5  node_modules/uglify-js                                  MYPROJECT
double-beep
  • 5,031
  • 17
  • 33
  • 41