[英]eslint npm ERR! 404 Not Found - GET https://registry.npmjs.org/eslist - Not found
I am trying to clean up my Javascript code and then to migrate to typescript.我正在尝试清理我的 Javascript 代码,然后迁移到 typescript。 I installed node.js npm and eslint on Ubuntu 20.04.
我在 Ubuntu 20.04 上安装了 node.js npm 和 eslint。 I ran npm -init and eslint -init.
我运行了 npm -init 和 eslint -init。
$ npx eslist util.js
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/eslist - Not found
npm ERR! 404
npm ERR! 404 'eslist@latest' is not in the npm 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! /home/jcobban/.npm/_logs/2021-03-14T19_42_22_328Z-debug.log
Install for eslist@latest failed with code 1
$ npm cache verify
Cache verified and compressed (~/.npm/_cacache):
Content verified: 296 (6848713 bytes)
Index entries: 449
Finished in 0.367s
I cannot find any report on stackoverflow in over a year with an explanation of this error or how to get around it.在一年多的时间里,我找不到任何关于 stackoverflow 的报告,其中解释了这个错误或如何解决它。
$ more .eslintrc.js
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react"
],
"rules": {
}
};
log日志
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/share/npm/bin/npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'eslist@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli '/home/jcobban/.npm/_npx/96863',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json' ]
2 info using npm@6.14.4
3 info using node@v10.19.0
4 verbose npm-session b1a2059d3c7803e8
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 404 https://registry.npmjs.org/eslist 635ms
8 http fetch GET 404 https://registry.npmjs.org/eslist 391ms
9 silly fetchPackageMetaData error for eslist@latest 404 Not Found - GET https:/
/registry.npmjs.org/eslist - Not found
10 timing stage:rollbackFailedOptional Completed in 2ms
11 timing stage:runTopLevelLifecycles Completed in 1043ms
12 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/eslist -
Not found
12 verbose stack at res.buffer.catch.then.body (/usr/share/npm/node_modules/
npm-registry-fetch/check-response.js:104:15)
12 verbose stack at process._tickCallback (internal/process/next_tick.js:68:
7)
13 verbose statusCode 404
14 verbose pkgid eslist@latest
15 verbose cwd /home/jcobban/public_html/jscripts
16 verbose Linux 5.8.0-7642-generic
17 verbose argv "/usr/bin/node" "/usr/share/npm/bin/npm-cli.js" "install" "eslis
t@latest" "--global" "--prefix" "/home/jcobban/.npm/_npx/96863" "--loglevel" "er
ror" "--json"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code E404
21 error 404 Not Found - GET https://registry.npmjs.org/eslist - Not found
22 error 404
23 error 404 'eslist@latest' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]
I entered the URL https://registry.npmjs.org/eslist into my browser and got back {"error":"Not found"}我在浏览器中输入了 URL https://registry.npmjs.org/eslist并返回 {"error":"Not found"}
Note that I have NEVER used node.js or npm or npx before today so I have absolutely no experience to guide me.请注意,在今天之前我从未使用过 node.js 或 npm 或 npx 所以我绝对没有经验来指导我。 I am merely going by what is in the page https://eslint.org/docs/user-guide/getting-started .
我只是通过页面https://eslint.org/docs/user-guide/getting-started中的内容。 I just want to clean up my code.
我只想清理我的代码。
stupid typo.愚蠢的错字。 I should have types eslint not eslist
我应该有类型 eslint 而不是 eslist
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.