博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
npm 更改默认全局路径以及国内镜像
阅读量:2389 次
发布时间:2019-05-10

本文共 344 字,大约阅读时间需要 1 分钟。

可以通过命令行的方式修改配置项和添加镜像,也可以通过配置文件的方式完成同样的功能。

命令行式方式

npm更改默认全局路径和cache路径

npm config set prefix 新路径

npm config set cache 新路径

npm config set registry https://registry.npm.taobao.org

查看更改结果

npm config ls -l或npm config list

配置文件的方式

在用户主目录下添加文件.npmrc

添加文件内容

registry=https://registry.npm.taobao.org/

prefix=e:\nodejs\npm_global
cache=e:\nodejs\npm_cache

转载地址:http://hltab.baihongyu.com/

你可能感兴趣的文章
windows目录监控软件
查看>>
Virus Bulletin malware分析杂志以及paper
查看>>
Security Considerations for AppLocker
查看>>
Oracle Forensics t00ls
查看>>
JetLeak Vulnerability: Remote Leakage Of Shared Buffers In Jetty Web Server [CVE-2015-2080]
查看>>
zZ-ModSecurity Framework支持Web应用安全核心规则集
查看>>
zz-LDAP详解
查看>>
zZ-google-perftools 加速MySQL – TCMalloc
查看>>
apache 防DDOS脚本
查看>>
使用syslog-ng 和stunnel 创建集中式安全日志服务器
查看>>
网友将电视剧潜伏当职场教科书 研究办公室政治
查看>>
graudit
查看>>
使用Hudson和FindBugs进行持续集成和代码检查
查看>>
New Tool: The PenTesters Framework (PTF) Released
查看>>
Detecting and Defending against PowerShell Shells
查看>>
NagVis实物监控工具
查看>>
nginx - low risk webdav destination bug
查看>>
Lessons Learned from Building and Running MHN, the World's Largest Crowdsourced Honeynet
查看>>
Logwatch Linux/Unix系统日志检测软件
查看>>
减少Linux下Squid服务器的TIME_WAIT套接字数量
查看>>