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 发布文章使用:只允许注册用户才可以访问!


npm & config settings的更多相关文章

  1. [NPM] Use custom config settings in your npm scripts

    In addition to package.json level variables (such as name and version), you can have custom conf set ...

  2. npm config

    在公司为了不再用 npm --registry=http://r.cnpmjs.org install -(g) xxx 就设置了内部的镜像文件地址为默认的代理地址 npm config set re ...

  3. npm config 删除变量

    问题 安装npm时,使用npm config set 命令重新设置了变量,但是设置变量时少了个空格,设置错了.使用npm config ls -l 查看环境变量 添加错的这一个,应该如何删除? 解决 ...

  4. .net Core Abp See config settings - "CustomSchemaIds" for a workaround

    Swagger  See config settings - "CustomSchemaIds" for a workaround System.InvalidOperationE ...

  5. npm 取消代理 npm config delete proxy

    今天在安装electron时设置了代理,发现再npm install 安装别的总是装不上,只好取消代理. npm 取消代理 npm config delete proxy

  6. npm & npm config

    npm command show npm config https://docs.npmjs.com/cli/config https://docs.npmjs.com/cli/ls https:// ...

  7. 56.如何清除已经设置的npm config配置

    npm config delete registry npm config delete disturl 或者 npm config edit 找到淘宝那两行,删除

  8. npm config set registry 与 cnpm的区别

    一直以为这2个事没有区别的: npm config set registry http://registry.npm.taobao.org 后使用npm命令. npm install -g cnpm ...

  9. npm config set registry

    npm config set registry $ npm config set registry $ npm config set registry https://registry.your-re ...

随机推荐

  1. Model(metaclass=ModelBase)

    Python装饰器.metaclass.abc模块学习笔记 - 王智愚 - 博客园 https://www.cnblogs.com/Security-Darren/p/4094959.html dja ...

  2. (014)每日SQL学习:oracle下lag和lead分析函数

    /*语法*/ lag(exp_str,offset,defval) over() Lead(exp_str,offset,defval) over() --exp_str要取的列 --offset取偏 ...

  3. fastHttp服务端处理请求的过程

    Github 地址 https://github.com/valyala/fasthttp fastHttp 服务端的处理请求的过程 工作过程 主要代码 设置监听地址 server.go func ( ...

  4. js部分知识整理,google浏览器的代码调试

    整理一些学过的js知识点,包括js中3个括号的含义,this的使用,递归,google浏览器的代码调试.Location的属性及常用方法,window对象常用方法,open方法等. js括号 在js中 ...

  5. NodeMCU使用ArduinoJson判断指定键值对存在与否

    NodeMCU使用ArduinoJson判断指定键值对存在与否 从ArduinoJson库中可以得知,判断键值对是否存在可以使用containskey()函数,但是查看ArduinoJson-cont ...

  6. Codeforces Round #652 (Div. 2) B. AccurateLee(字符串)

    题目链接:https://codeforces.com/contest/1369/problem/B 题意 给出一个长 $n$ 的 二进制串,每次可以选择字符串中的一个 $10$,然后删除其中的一个字 ...

  7. 【poj 1984】&【bzoj 3362】Navigation Nightmare(图论--带权并查集)

    题意:平面上给出N个点,知道M个关于点X在点Y的正东/西/南/北方向的距离.问在刚给出一定关系之后其中2点的曼哈顿距离((x1,y1)与(x2,y2):l x1-x2 l+l y1-y2 l),未知则 ...

  8. hdu5496 Beauty of Sequence

    Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission ...

  9. Codeforces Round #646 (Div. 2) C. Game On Leaves (贪心,博弈)

    题意:给你一棵树,每次可以去掉叶节点的一条边,Ayush先开始,每回合轮流来,问谁可以第一个把\(x\)点去掉. 题解:首先如果\(x\)的入度为\(1\),就可以直接拿掉,还需要特判一下入度为\(0 ...

  10. AtCoder AIsing Programming Contest 2020 D - Anything Goes to Zero (二进制,模拟)

    题意:给你一个长度为\(n\)的\(01\)串,从高位到低位遍历,对该位取反,用得到的十进制数\(mod\)所有位上\(1\)的个数,不断循环直到为\(0\),输出每次遍历时循环的次数. 题解:根据题 ...