【问题标题】:npm install geckodriver fails because of file not found [WSL]npm install geckodriver 由于找不到文件而失败 [WSL]
【发布时间】:2019-02-16 07:52:41
【问题描述】:

在构建依赖于 selenium-cucumber-js 的项目的上下文中,我尝试在以下设置中安装 geckodriver:

  • 操作系统:WSL Ubuntu 16.04
  • 节点:8.15.0(从 nvm 安装)
  • NPM:5.10.0(从 nvm 安装)

当我执行npm install geckodriver 时,我收到以下错误消息:

npm ERR! path /home/username/myfolder/node_modules/geckodriver/bin/geckodriver
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/username/myfolder/node_modules/geckodriver/bin/geckodriver'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2019-02-16T07_38_34_159Z-debug.log

我在日志中找不到更多信息。 我可以用webdriver-manager成功安装geckodriver,但是不满足package.json中的selenium-cucumber-js依赖。

知道如何解决这个问题吗?

【问题讨论】:

    标签: node.js npm windows-subsystem-for-linux geckodriver


    【解决方案1】:

    编辑:似乎是一个版本范围的问题。其他人也在 github tracker 上报告了同样的问题。 https://github.com/vladikoff/node-geckodriver/issues/59

    npm install geckodriver@1.14 工作正常。

    【讨论】:

      猜你喜欢
      • 2023-03-05
      • 2022-11-01
      • 2022-08-11
      • 2022-12-04
      • 2019-02-04
      • 1970-01-01
      • 2019-05-05
      • 1970-01-01
      • 2014-11-17
      相关资源
      最近更新 更多