简体   繁体   English

创建新的 Angular 项目时 - 包安装失败

[英]when creating new angular project - package install failed

Error while creating a new project using angular cli .it shows使用 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 ] 

i've tried : 1 -npm clear cache --force and manually deleted the npm cache folder 2- upgrade and change angular cli version 3- change the registry with : npm config set registry http://registry.npmjs.org None of them worked我试过: 1 -npm clear cache --force 并手动删除 npm 缓存文件夹 2- 升级和更改 angular cli 版本 3- 更改注册表: npm config set registry http://registry.npmjs.org没有他们工作

Angular CLI: 9.0.1 Node: 12.13.0 OS: win32 ia32 Windows 10 Angular CLI:9.0.1 节点:12.13.0 操作系统:win32 ia32 Windows 10

Set the registry to this and , install the dependency globally.将注册表设置为 this 和 ,全局安装依赖项。 Then re-do the creation of new app.然后重新创建新应用程序。

npm config set registry http://registry.npm.taobao.org npm 配置设置注册表http://registry.npm.taobao.org
npm install -g error-ex@1.3.1 npm install -g error-ex@1.3.1

ng new my-new-app ng new my-new-app

source : https://github.com/Qix-/node-error-ex/issues/13来源: https : //github.com/Qix-/node-error-ex/issues/13

See this issue看到这个问题

npm install fails with 'error-ex@^1.3.1' is not in the npm registry npm install 失败,'error-ex@^1.3.1' 不在 npm 注册表中

There is currently a missing NPM package repository (404) - so all npms dependent on that package are broken.当前缺少 NPM 软件包存储库 (404) - 因此所有依赖于该软件包的 npms 都已损坏。 It's being tracked in that thread and for those of us affected, we'll update that thread as well.它正在该线程中被跟踪,对于我们这些受影响的人,我们也会更新该线程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM