npm yarn pnpm 安装指南

安装

dnf install npm

npm

更换为淘宝源

npm config -g set registry http://registry.npm.taobao.org/
npm config -g set puppeteer_download_host https://npm.taobao.org/mirrors

安装 chrome 驱动(puppeteer相关)

npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver

安装 node-sass

npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/

清除缓存

npm cache clean --force

gyp 和 vs


npm install -g node-gyp
npm install --global --production windows-build-tools

cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

yarn

安装

npm install -g yarn --registry=https://registry.npm.taobao.org

更新

yarn global add yarn

切换为淘宝源

yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

安装puppeteer

yarn config set puppeteer_download_host https://npm.taobao.org/mirrors -g

使用国内源tyarn

npm i yarn tyarn -g

pnpm

npm i pnpm -g
pnpm config set registry http://registry.npm.taobao.org
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容