npm & config settings
npm & config settings
how to check npm config settings
https://docs.npmjs.com/cli/config
$ npm config list
$ npm config list --json
$ npm config list -l
$ npm config list -l --json
$ npm config list --json
{
"json": true,
"user-agent": "npm/6.4.1 node/v10.15.3 win32 x64",
"metrics-registry": "https://registry.npmjs.org/",
"scope": "",
"prefix": "C:\\Users\\xgqfrms\AppData\\Roaming\\npm",
"access": null,
"allow-same-version": false,
"always-auth": false,
"also": null,
"audit": true,
"audit-level": "low",
"auth-type": "legacy",
"bin-links": true,
"browser": null,
"ca": null,
"cache": "C:\\Users\\xgqfrms\\AppData\\Roaming\\npm-cache",
"cache-lock-stale": 60000,
"cache-lock-retries": 10,
"cache-lock-wait": 10000,
"cache-max": null,
"cache-min": 10,
"cert": null,
"cidr": null,
"color": true,
"depth": null,
"description": true,
"dev": false,
"dry-run": false,
"editor": "notepad.exe",
"engine-strict": false,
"force": false,
"fetch-retries": 2,
"fetch-retry-factor": 10,
"fetch-retry-mintimeout": 10000,
"fetch-retry-maxtimeout": 60000,
"git": "git",
"git-tag-version": true,
"commit-hooks": true,
"global": false,
"globalconfig": "C:\\Users\\xgqfrms\\AppData\\Roaming\\npm\\etc\\npmrc",
"global-style": false,
"group": 0,
"ham-it-up": false,
"heading": "npm",
"if-present": false,
"ignore-prepublish": false,
"ignore-scripts": false,
"init-module": "C:\\Users\\xgqfrms\\.npm-init.js",
"init-author-name": "",
"init-author-email": "",
"init-author-url": "",
"init-version": "1.0.0",
"init-license": "ISC",
"key": null,
"legacy-bundling": false,
"link": false,
"loglevel": "notice",
"logs-max": 10,
"long": false,
"maxsockets": 50,
"message": "%s",
"node-options": null,
"node-version": "10.15.3",
"offline": false,
"onload-script": null,
"only": null,
"optional": true,
"otp": null,
"package-lock": true,
"package-lock-only": false,
"parseable": false,
"prefer-offline": false,
"prefer-online": false,
"preid": "",
"production": false,
"progress": true,
"proxy": null,
"https-proxy": null,
"noproxy": null,
"read-only": false,
"rebuild-bundle": true,
"registry": "https://registry.npmjs.org/",
"rollback": true,
"save": true,
"save-bundle": false,
"save-dev": false,
"save-exact": false,
"save-optional": false,
"save-prefix": "^",
"save-prod": false,
"script-shell": null,
"scripts-prepend-node-path": "warn-only",
"searchopts": "",
"searchexclude": null,
"searchlimit": 20,
"searchstaleness": 900,
"send-metrics": false,
"shell": "C:\\WINDOWS\\system32\\cmd.exe",
"shrinkwrap": true,
"sign-git-commit": false,
"sign-git-tag": false,
"sso-poll-frequency": 500,
"sso-type": "oauth",
"strict-ssl": true,
"tag": "latest",
"tag-version-prefix": "v",
"timing": false,
"tmp": "C:\\Users\\xgqfrms\\AppData\\Local\\Temp",
"unicode": false,
"unsafe-perm": true,
"update-notifier": true,
"usage": false,
"user": 0,
"userconfig": "C:\\Users\\xgqfrms\\.npmrc",
"umask": 0,
"version": false,
"versions": false,
"viewer": "browser",
"globalignorefile": "C:\\Users\\xgqfrms\\AppData\\Roaming\\npm\\etc\\npmignore"
}
$ npm config set <key> <value> [-g|--global]
$ npm config get <key>
$ npm config delete <key>
$ npm config list [-l] [--json]
$ npm config edit
$ npm get <key>
$ npm set <key> <value> [-g|--global]
# aliases: c
https://docs.npmjs.com/misc/config
https://docs.npmjs.com/cli/config
https://docs.npmjs.com/files/npmrc
https://docs.npmjs.com/managing-your-profile-settings
https://stackoverflow.com/questions/42137329/npm-config-list-environment-configs-registry
npm install -d
holy shit
https://docs.npmjs.com/cli/install
https://www.npmjs.com.cn/cli/install/
这个 -d --save 啥意思,要么 -D
/ --save-dev
, 要么 -S
/ --save
所以你这个 -d --save 不存在的呀;要么 -D / --save-dev , 要么 -S / --save
-d 不认识,直接被 npm 忽略了, 所以 --save 才会生效
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10810865.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
2016-05-05 CSS3 box-sizing 属性
2016-05-05 Google reCAPTCHA 2 : Protect your site from spam and abuse & Google reCAPTCHA 2官方教程