npm install报错:chromedriver@2.27.2 install: node install.js
报错:
刚开始以为是 node 或 npm 版本问题,前前后后折腾了好久,终于解决了

解决:
- 如果执行过
npm install,先删除 node_modules 文件夹,不然运行的时候可能会报错 - 执行下面的命令
npm install chromedriver --chromedriver_cdnurl=http://cdn.npm.taobao.org/dist/chromedriver
- 再执行
npm install即可正常下载
分析:
经分析发现,某些版本下,chromedriver 的 zip 文件 url 的响应是 302 跳转,而在 install.js 里使用的是 Node.js 内置的 http 对象的 get 方法无法处理 302 跳转的情况;而在另外一些情况下,则是因为 googleapis.com 被墙了,此时即使采用科学 上网的方法也仍然无法获取文件。
参考:
https://segmentfault.com/a/1190000008310875
https://www.npmjs.com/package/chromedriver
npm install报错:chromedriver@2.27.2 install: node install.js的更多相关文章
- Mac 下使用brew install 报错: Cowardly refusing to `sudo brew install'
Mac 下使用brew install 报错: localhost:infer-osx-v0.6.0 admin$ sudo brew install opam Error: Cowardly ref ...
- 输入npm install 报错node-sass@4.13.0 postinstall:`node scripts/build.js` Failed at the node-sass@4.13.0
这个是因为sass安装时获取源的问题,先修改sass安装的源,再运行npm install就成功了 npm config set sass_binary_site=https://npm.taobao ...
- 执行npm install报错:npm ERR! code EINTEGRITY
命令行执行npm install报错如下: D:\frontend\viewsdev>npm install npm ERR! code EINTEGRITY npm ERR! sha512-8 ...
- npm install 报错:node-pre-gyp ERR! 问题解决
npm install报错问题解决 问题: E:\CodeSpace\GitlabTest\desktop>npm install > lifeccp-desktop@1.1.9 post ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- npm install 报错,提示`gyp ERR! stack Error: EACCES: permission denied` 解决方法
m install 报错,提示gyp ERR! stack Error: EACCES: permission denied 猜测可能是因为没有权限读写,ls -la看下文件权限设置情况 [root@ ...
- 在运行vue项目时,执行npm install报错小记
在运行vue项目时,执行npm install 报错,导致后续的执行报各种错误,根据报错,尝试了网上的各种办法,最后发现时网络问题下载失败导致,解决办法: 安装cnpm==>npm instal ...
- npm install 报错解决办法
npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...
- npm -v 报错:Error: EPERM: operation not permitted, mkdir 'C:\soft\nodejs'
npm -v 报错:Error: EPERM: operation not permitted, mkdir 'C:\soft\nodejs' 起因:原本安装node在C盘soft文件夹下,按node ...
随机推荐
- libfastcommon总结(〇)
libfastcommon提供众多基础功能,该系列笔记将进行学习介绍. load_local_host_ip_addrs 进行加载主机上所有网卡的IPv4的地址. iniLoadFromFile 从文 ...
- 微服务系列之 Consul 注册中心
原文链接:https://mrhelloworld.com/posts/spring/spring-cloud/consul-service-registry/ Netflix Eureka 2.X ...
- 数据结构和算法:Python实现二分查找(Binary_search)
在一个列表当中我们可以进行线性查找也可以进行二分查找,即通过不同的方法找到我们想要的数字,线性查找即按照数字从列表里一个一个从左向右查找,找到之后程序停下.而二分查找的效率往往会比线性查找更高. 一. ...
- Natas26 Writeup(PHP反序列化漏洞)
Natas26: 打开页面是一个输入坐标点进行绘图的页面. <html> <head> <!-- This stuff in the header has nothing ...
- JVM收集器简介
JVM GC收集器集合:
- 保姆级教程!手把手教你使用Longhorn管理云原生分布式SQL数据库!
作者简介 Jimmy Guerrero,在开发者关系团队和开源社区拥有20多年的经验.他目前领导YugabyteDB的社区和市场团队. 本文来自Rancher Labs Longhorn是Kubern ...
- Django之CBV装饰器,跨站请求伪造,auth认证
CBV加装饰器 基于session实现登录 def login(request): if request.method == 'POST': username = request.POST.get(' ...
- editplus软件使用技巧
1.文本文件的特点 注:不针对editplus这个软件,对于其他的文本文件处理软件也同样适用. 文本文件就是不包含其它文字格式(比如字体,字号,对齐,行间距等)以及富文本(比如图片,表格等)的一种纯文 ...
- C# 基础知识系列- 4 面向对象
面向对象 面向对象是一个抽象的概念,其本质就是对事物以抽象的方式建立对应的模型. 简单来讲,比如我有一只钢笔,那么我就可以通过分析,可以得到 这只钢笔的材第是塑料,品牌是个杂牌 ,里面装的墨是黑色的, ...
- 2017-12-08高级.net 面试小结
现在思维是企业级开发思维 应该往互联网思维转变,主要涉及,队列 ,消息,数据并发,数据安全,前端,vue,element UI 以下为速8酒店笔试题 1.有如下代码: string s1;string ...