node_modules卸载重装
- rm -rf node_modules
- rm package-lock.json
- npm cache clear --force
- npm install
更换镜像
- npm config get registry 查看镜像地址
- npm set registry registry.npm.taobao.org
- npm login
- 输入账号和密码
- npm config set always-auth=true
- npm i
errno 1
npm install chromedriver@2.46.0 --ignore-scripts
全局安装指定npm版本时报错:cnpm install npm@6.14.11 -g
- 更新到最新版本:npm install npm -g
- 回退版本:npm install -g npm@6.14.11
报错如下:
解决方案: