npm WARN: No repository field.

简介: npm WARN: No repository field.

前言


在使用 npm 安装包时,遇到 npm Warn name@x.x.x No repository field.


意思是你的 package.json 缺少 repository 仓库字段。可采用以下两种方式解决 WARNING。


正文


一、你的项目有仓库地址时:

// package.json
{
  "repository": {
    "type": "git",
    "url": "http://github.com/yourname/repositoryname.git"
  }
}


二、作为测试、练习项目没有仓库地址时,将项目声明为私有,这样就不会有提示了。

// package.json
{
  "private": true
}


目录
相关文章
npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
529 0
|
缓存 JavaScript
解决node与npm版本不一致,出现npm WARN npm npm does not support Node.js v15.14.0
解决node与npm版本不一致,出现npm WARN npm npm does not support Node.js v15.14.0
解决node与npm版本不一致,出现npm WARN npm npm does not support Node.js v15.14.0
|
8月前
|
JavaScript
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
145 2
Error:npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\XX\package.json‘son‘
Error:npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\XX\package.json‘son‘
|
JavaScript
npm WARN npm npm does not support Node.js v16.14.2 npm WARN npm You should probably upgrade to a new
npm WARN npm npm does not support Node.js v16.14.2 npm WARN npm You should probably upgrade to a new
427 0
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6
131 0
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6
npm WARN lifecycle yarn@1.22.19~preinstall: cannot run in wd %s %s
npm WARN lifecycle yarn@1.22.19~preinstall: cannot run in wd %s %s
900 0
|
前端开发
前端项目实战2-npm WARN config global --global, --local are deprecated. Use `–location解决方案
前端项目实战2-npm WARN config global --global, --local are deprecated. Use `–location解决方案
1396 0
|
24天前
|
JavaScript
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
node环境之Error: Cannot find module ‘chalk’ 报错无法解决的问题—-网上说让你npm install chalk 基本是没有用的-优雅草央千澈解决方案
|
21天前
node环境之当我们遇到需要付费的依赖库@fortawesome/fontawesome-pro导致npm install无法进行怎么办-fontawesome-pro依赖库
node环境之当我们遇到需要付费的依赖库@fortawesome/fontawesome-pro导致npm install无法进行怎么办-fontawesome-pro依赖库
node环境之当我们遇到需要付费的依赖库@fortawesome/fontawesome-pro导致npm install无法进行怎么办-fontawesome-pro依赖库

热门文章

最新文章

推荐镜像

更多