node.js - 节点错误 npm ERR!在 Angular 项目中使用 npm install 时从未调用 cb()
问题描述
当我从 git 克隆 Angular 11 项目并运行npm install
时,出现以下错误:
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/something/.npm/_logs/2021-06-26T17_17_38_979Z-debug.log
我在 Ubuntu 20.04.2 和节点 14.17.1 和 npm 6.14.13 上运行。
到目前为止,我已经尝试再次卸载和安装 node 和 npm 并运行这些命令,但它们都不起作用:
npm cache clean --force
npm install --no-package-lock
而且我克隆的项目中也没有node_modules和package-lock.json。所以删除它们也不起作用(因为它们不存在)。
解决方案
试试这个
npx npmc@latest install
推荐阅读
- android-studio - 错误:包android.support.v4.content不存在导入android.support.v4.content.FileProvider;
- python - 在 Bokeh 仪表板中使用 Python 进行 K-means 聚类;创建一个表来显示集群的意思
- flutter - 类型“ASN1Object”不是类型转换中“ASN1Sequence”类型的子类型
- reactjs - 功能组件中局部变量的最佳方式反应原生
- python - 使用正则表达式从 ifConfig 获取 MAC 地址
- windows - 如何让 Windows 程序监听来自 WSL 的连接而不绑定到 0.0.0.0?
- javascript - 响应式移动导航栏链接无法在移动设备上运行
- django - 在 Django 中:即使在 forms.py 中使用“queryset = objects.none()”后,我仍然可以看到包含所有选项的下拉菜单
- java - 如何添加第二个css选择器xpath,其中相同的元素出现多次
- python - 无法使用 conda 安装 m2w64-libpng