【发布时间】:2020-05-27 21:00:48
【问题描述】:
使用 Angular cli 创建新项目时出错。它显示
3492 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/error-ex
3492 verbose stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-registry-fetch\check-response.js:104:15
3492 verbose stack at runMicrotasks (<anonymous>)
3492 verbose stack at processTicksAndRejections (internal/process/task_queues.js:93:5)
3493 verbose statusCode 404
3494 verbose pkgid error-ex@^1.3.1
3495 verbose cwd C:\Users\amemni\Angular\test\testt
3496 verbose Windows_NT 10.0.17134
3497 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--quiet"
3498 verbose node v12.13.0
3499 verbose npm v6.12.0
3500 error code E404
3501 error 404 Not Found - GET https://registry.npmjs.org/error-ex
3502 error 404
3503 error 404 'error-ex@^1.3.1' is not in the npm registry.
3504 error 404 You should bug the author to publish it (or use the name yourself!)
3505 error 404 It was specified as a dependency of 'parse-json'
3506 error 404 Note that you can also install from a
3507 error 404 tarball, folder, http url, or git url.
3508 verbose exit [ 1, true ]
我试过了: 1 -npm clear cache --force 并手动删除npm缓存文件夹 2-升级和更改 Angular cli 版本 3-更改注册表: npm config set registry http://registry.npmjs.org 他们都没有工作
Angular CLI:9.0.1 节点:12.13.0 操作系统:win32 ia32 视窗 10
【问题讨论】:
-
npm 注册表中出现了一些错误。您可以在这里查看状态:status.npmjs.org,应该很快就会解决。不要安装其他软件包或使用其他注册表来修补它,你会搞砸的:)