关于npm:安装nodejs准备开发的前期设置

设置淘宝源

npm

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

yarn

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

设置全局下载目录

npm

npm config set prefix "D:\nodejs\npm\global"
npm config set cache "D:\nodejs\npm\cache"

yarn

yarn config set global-folder "D:\nodejs\yarn\global"
yarn config set cache-folder "D:\nodejs\yarn\cache"
yarn config set prefix "D:\nodejs\yarn\bin"

win10 PowerShell yarn 无奈辨认问题

  1. 确保环境变量Path设置无误
  2. 超管关上PowerShell 输出命令 确定
    Set-ExecutionPolicy RemoteSigned

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理