解决Node.js依赖下载不下来及环境问题
如果node
项目中遇到了依赖python2.7
、node v8
等旧版本的依赖,可以将相关版本的zip下载到当前目录解压
然后执行以下命令进行安装依赖和启动项目
- set path=%cd%/node-v8.17.0-win-x64 (强行替换node)
- set PYTHON=%cd%/Python27 (指定python)
- npm config set proxy=http://127.0.0.1:8888 (梯子)
- npm config set https-proxy http://127.0.0.1:8888 (梯子)
- npm config set registry=https://registry.npm.taobao.org
- npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
- npm install
- npm config delete proxy (取消梯子)
- npm config delete https-proxy (取消梯子)
- npm run build
共有 0 条评论