npm警告:npm WARN [email protected] No repository field.
程序员文章站
2021-11-28 11:23:44
...
npm警告:npm WARN No repository field.
使用npm安装第三方扩展包出现警告提示:
npm WARN [email protected] No repository field.
查看本机版本:
$ node --version
v10.11.0
$ npm --version
6.5.0
$ nest --version
5.7.1
具体警告内容:
$ npm install --save @nestjs/typeorm typeorm mysql
npm WARN [email protected] No repository field.
+ @nestjs/[email protected]
+ [email protected]
+ [email protected]
updated 3 packages in 10.157s
项目[email protected]
没有指定仓库字段。
解决办法1: 提示缺少“repository”,那就增加“repository”字段:
在package.json
中增加repository
字段, url地址写上改项目的git地址:
"repository": {
"type": "git",
"url": "[git-url-of-your-project]"
},
解决办法2: 将项目声明为私有项目
在package.json
中增加private
字段, 将项目声明为私有项目:
"private": true,
参见Angular项目,默认生成的package.json
文件,就声明为私有项目。
参考链接:
https://blog.csdn.net/qq_18185875/article/details/55667560
https://blog.csdn.net/u012971339/article/details/55260720
[END]
推荐阅读
-
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os"
-
npm WARN deprecated @hapi/[email protected]: Switch to ‘npm install joi‘ npm install -g @vue/cli 出错
-
npm WARN deprecated [email protected]: [email protected]<3.3 is no longer maintained and not recommended for usa
-
npm install -g hey-cli报错npm WARN deprecated [email protected]: [email protected]<3 is no longer
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents
-
【记录bug】npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsvents): npm WA...
-
npm报错:npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents): npm WA
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
-
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents
-
npm安装express时出现npm WARN [email protected] No descriptionnpm WARN [email protected] No repos