[英]npm show --outdated produces a E404 'is not in this registry' error
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:
使用节点 v17.3.0 和 npm 8.3.0,我无法显示过时的依赖项:
$ 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.我的
package.json
很常见。
{
"name": "MYPROJECT",
"version": "1.0.0",
"private": true,
"licence": "UNLINCENSED",
"devDependencies": {...},
"dependencies": {...}
}
What am I missing?我错过了什么?
npm show
is an alias for npm view
. npm show
是npm view
的别名。 This command expects a package as an argument and searches it in the NPM registry.此命令需要 package 作为参数,并在 NPM 注册表中搜索它。 Here's what it outputs when I run
npm view eslint
( coloured ):这是我运行
npm view eslint
(彩色)时输出的内容:
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. npm outdated
是查找过期依赖项的正确方法。 This will output:这将 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.