189 8069 5689

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

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

在潜山等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供网站制作、网站建设 网站设计制作按需定制,公司网站建设,企业网站建设,高端网站设计,成都全网营销推广,成都外贸网站建设,潜山网站建设费用合理。

> 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 
  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

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

npm install --ignore-scripts

网页标题:解决npminstall时报错无法安装chromedriver的问题
网页URL:http://cdxtjz.com/article/ishgij.html

其他资讯