【问题标题】:when creating new angular project - package install failed创建新的角度项目时 - 包安装失败
【发布时间】: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,应该很快就会解决。不要安装其他软件包或使用其他注册表来修补它,你会搞砸的:)

标签: node.js angular package


【解决方案1】:

查看本期

npm install fails with 'error-ex@^1.3.1' is not in the npm registry

当前缺少 NPM 包存储库 (404) - 因此依赖于该包的所有 npm 都已损坏。它正在该线程中进行跟踪,对于我们这些受影响的人,我们也会更新该线程。

【讨论】:

    【解决方案2】:

    将注册表设置为此并全局安装依赖项。然后重新创建新应用程序。

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

    新的我的新应用

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

    【讨论】:

      猜你喜欢
      • 2021-05-12
      • 2020-02-17
      • 1970-01-01
      • 1970-01-01
      • 2015-08-23
      • 2019-05-09
      • 2018-11-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多