安装visual studio的时候,安装Node.js会同时安装npm

查看版本

PS C:\Users\clu\Desktop> npm --version
5.6.0

PS C:\Users\clu\Desktop> npm version
{ npm: '5.6.0',
ares: '1.14.0',
cldr: '33.0',
http_parser: '2.8.0',
icu: '61.1',
modules: '64',
napi: '3',
nghttp2: '1.29.0',
node: '10.2.1',
openssl: '1.1.0h',
tz: '2018c',
unicode: '10.0',
uv: '1.20.3',
v8: '6.6.346.32-node.8',
zlib: '1.2.11' }

配置代理

必须加上前缀http://,并且必须用单引号包含

npm config set proxy 'http://url:port'

查看代理

npm get proxy

查看所有配置

PS C:\Users\clu\Desktop> npm config list -l
; cli configs
long = true
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.6.0 node/v10.2.1 win32 x64"

; userconfig C:\Users\clu\.npmrc
https-proxy = "http://sapacsin05_p.aet.services.net:8080/"
proxy = "http://sapacsin05_p.aet.accervices.net:8080/"
python = "C:\\Users\\clu\\.windows-build-tools\\python27"
strict-ssl = false

; globalconfig C:\Users\clu\AppData\Roaming\npm\etc\npmrc
msvs_version = "2015"
; python = "C:\\Users\\clu\\.windows-build-tools\\python27\\python.exe" (overridden)

; builtin config undefined
prefix = "C:\\Users\\clu\\AppData\\Roaming\\npm"

; default values
access = null
allow-same-version = false
also = null
always-auth = false
auth-type = "legacy"
bin-links = true
browser = null
ca = null
cache = "C:\\Users\\clu\\AppData\\Roaming\\npm-cache"
cache-lock-retries = 10
cache-lock-stale = 60000
cache-lock-wait = 10000
cache-max = null
cache-min = 10
cafile = undefined
cert = null
cidr = null
color = true
commit-hooks = true
depth = null
description = true
dev = false
dry-run = false
editor = "notepad.exe"
engine-strict = false
fetch-retries = 2
fetch-retry-factor = 10
fetch-retry-maxtimeout = 60000
fetch-retry-mintimeout = 10000
force = false
git = "git"
git-tag-version = true
global = false
global-style = false
globalconfig = "C:\\Users\\clu\\AppData\\Roaming\\npm\\etc\\npmrc"
globalignorefile = "C:\\Users\\clu\\AppData\\Roaming\\npm\\etc\\npmignore"
group = 0
ham-it-up = false
heading = "npm"
; https-proxy = null (overridden)
if-present = false
ignore-prepublish = false
ignore-scripts = false
init-author-email = ""
init-author-name = ""
init-author-url = ""
init-license = "ISC"
init-module = "C:\\Users\\clu\\.npm-init.js"
init-version = "1.0.0"
json = false
key = null
legacy-bundling = false
link = false
local-address = undefined
loglevel = "notice"
logs-max = 10
; long = false (overridden)
maxsockets = 50
message = "%s"
; metrics-registry = null (overridden)
node-options = null
node-version = "10.2.1"
offline = false
onload-script = null
only = null
optional = true
otp = 0
package-lock = true
package-lock-only = false
parseable = false
prefer-offline = false
prefer-online = false
; prefix = "C:\\Program Files\\nodejs" (overridden)
production = false
progress = true
; proxy = null (overridden)
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
scope = ""
script-shell = null
scripts-prepend-node-path = "warn-only"
searchexclude = null
searchlimit = 20
searchopts = ""
searchstaleness = 900
send-metrics = false
shell = "C:\\WINDOWS\\system32\\cmd.exe"
shrinkwrap = true
sign-git-tag = false
sso-poll-frequency = 500
sso-type = "oauth"
; strict-ssl = true (overridden)
tag = "latest"
tag-version-prefix = "v"
timing = false
tmp = "C:\\Users\\clu\\AppData\\Local\\Temp"
umask = 0
unicode = false
unsafe-perm = true
usage = false
user = 0
; user-agent = "npm/{npm-version} node/{node-version} {platform} {arch}" (overridden)
userconfig = "C:\\Users\\clu\\.npmrc"   自定义的配置文件路径
version = false
versions = false
viewer = "browser"

最新文章

  1. 黑马程序员_ Objective-c 之block、protocol学习笔记
  2. 浅谈Dictionary用法
  3. Use Dapper ORM With ASP.NET Core
  4. json_decode()和json_encode()的使用方法
  5. 有时间测试dism
  6. oracle 共享池( shared pool )
  7. 把一个序列转换成非严格递增序列的最小花费 POJ 3666
  8. stm32f407 定时器 用的APB1 APB2 及 定时器频率
  9. poj1009
  10. mysql配置文件my.cnf解析转载
  11. [Jobdu] 题目1520:树的子结构
  12. Spring注解与Spring与Struts2整合
  13. ECLIPSE中反编译插件JAD的配置安装,轻松查看JAVA源代码
  14. 经典算法题每日演练——第七题 KMP算法
  15. CentOS7安装完毕,重新开机启动后显示: Initial setup of CentOS Linux 7 (core)
  16. java中Class对象详解
  17. 错误: error C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. 的处理方法
  18. Weka算法介绍
  19. 51nod_1100:斜率最大
  20. 随笔:JavaScript函数中的对象----arguments

热门文章

  1. 零基础入门学习Python(15)--格式化
  2. 第二次:Ubuntu16.04 安装Docker
  3. ECNU 3263 丽娃河的狼人传说 (贪心)
  4. 我们参与投资36Kr股权众筹项目“易途8”的决策过程
  5. oracle spool
  6. java 构造不可变类集的使用方法
  7. 【最大流】Escape
  8. 详解SpringBoot集成jsp(附源码)+遇到的坑
  9. [USACO12FEB]附近的牛Nearby Cows
  10. Perfect Service UVA - 1218