繁体   English   中英

npm 安装未安装所有依赖项

[英]npm install not installing all the dependencies

我尝试使用npm install安装所有依赖项,但当前项目中没有安装依赖项。 它显示以下消息。

npm install 后显示的结果

然后我尝试使用npm audit 这也显示了“发现的漏洞”,如下图所示。

npm 审计的结果

但最后,当我尝试使用npm audit fix来修复漏洞时,它找不到漏洞并显示“found 0 of 0漏洞”,如下图所示。

npm 审计修复的结果

使用npm install帮助我安装所有依赖项。

我在 windows 系统中安装了节点 v10.15.0 和 npm v6.4.1。

产生这两个警告的原因是:

  1. 项目的package.json文件中没有“description”属性定义或为空字符串。 这可能不是强制性的,但上传没有描述的项目会让人很难搜索。
  2. package.json文件中没有“存储库”属性定义或为空字符串。 通常,您可以将项目的 url 放在 GitHub 之类的存储库中,但这不是强制性的。

通常,在项目文件夹中第一次运行npm install时会输入这些字段以响应安装问题,但您始终可以编辑package.json以稍后添加或更新它们。

计算已found vulnerabilities found中的空格和audit fix output 表明在found 0 vulnerabilities中计数为0 尝试将 output 定向到文件,例如通过在项目文件夹中运行npm install >log.txt来确定。 基本上,主要问题似乎是彩色文本的终端再现。

Colored text is produced by inserting ANSI escapes into NPM output strings and usually works in standard system terminal programs - for example, Windows 10 cmd logs the message in white text with the 0 presented in green, both on a dark background, meaning it's completely readable .

暂无
暂无

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

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