NPM - 无许可证字段 [英] NPM - No license field
问题描述
我正在尝试在 Visual Studio Code 的集成终端上使用以下命令:npm 安装
I am trying to use the following command on the integrated terminal on Visual Studio Code: npm install
但是,显示错误.它说,npm WARN package.json AngularJS2@1.0.0 没有许可证字段."我应该怎么做才能解决这个问题?
However, an error has been displayed. It says, "npm WARN package.json AngularJS2@1.0.0 No license field." What should I do to fix this issue?
推荐答案
在您的 package.json
文件中添加许可属性,例如:
Add a license attribute in your package.json
file, e.g:
{
"name": ....
"license" : "SEE LICENSE IN <filename>"
}
如果您正在使用 OSI 批准的许可证开发开源软件包,请使用此列表中的标识符 作为 license
属性的值.
If you are working on an open source package with an OSI-approved license, use it's identifier from this list as value for the license
attribute.
这里是 package.json 格式的规范:https://docs.npmjs.com/files/package.json
Here is the specification of the package.json format: https://docs.npmjs.com/files/package.json
这篇关于NPM - 无许可证字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!