配置文件D:\GreenSoft\HBuilderX\plugins\npm\node_modules\npm\.npmrc

registry https://registry.npm.taobao.org
sass_binary_site https://npm.taobao.org/mirrors/node-sass
phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs
electron_mirror https://npm.taobao.org/mirrors/electron
sqlite3_binary_host_mirror https://npm.taobao.org/mirrors/sqlite3
profiler_binary_host_mirror https://npm.taobao.org/mirrors/node-inspector
chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver

在npm install执行前执行:

npm config set registry https://registry.npm.taobao.org
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass
npm config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs
npm config set electron_mirror https://npm.taobao.org/mirrors/electron
npm config set sqlite3_binary_host_mirror https://npm.taobao.org/mirrors/sqlite3
npm config set profiler_binary_host_mirror https://npm.taobao.org/mirrors/node-inspector
npm config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver

发表评论

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

Captcha Code