前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >解决npm install时报错无法安装chromedriver的问题

解决npm install时报错无法安装chromedriver的问题

作者头像
端碗吹水
发布2020-09-23 10:06:07
5.1K0
发布2020-09-23 10:06:07
举报
文章被收录于专栏:程序猿的大杂烩

最近使用vue开发了一个前端项目,开发好后准备部署到服务器上。从git仓库拉下项目代码后,运行npm install安装项目所依赖的模块时却报错了,错误信息如下:

代码语言:javascript
复制
> chromedriver@2.41.0 install /app/developer/git-repository/back_admin_front/node_modules/chromedriver
> node install.js

/app/developer/git-repository/back_admin_front/node_modules/chromedriver/chromedriver is not writable: EACCES: permission denied, mkdir '/app/developer/git-repository/back_admin_front/node_modules/chromedriver/chromedriver'
Downloading https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
Saving to /tmp/chromedriver/chromedriver_linux64.zip
Received 781K...
Received 1575K...
Received 2359K...
Received 3143K...
Received 3852K total.
Extracting zip contents
Copying to target path /app/developer/git-repository/back_admin_front/node_modules/chromedriver/lib/chromedriver
ChromeDriver installation failed { Error: EACCES: permission denied, mkdir '/app/developer/git-repository/back_admin_front/node_modules/chromedriver/lib/chromedriver'
    at Object.fs.mkdirSync (fs.js:885:18)
    at /app/developer/git-repository/back_admin_front/node_modules/chromedriver/install.js:230:10
    at <anonymous>
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/app/developer/git-repository/back_admin_front/node_modules/chromedriver/lib/chromedriver' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.41.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the chromedriver@2.41.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-10T02_21_34_357Z-debug.log

解决办法,先安装以下模块:

代码语言:javascript
复制
npm install --ignore-scripts
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018/10/10 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档