christian-bromann / webdriverio-performance-testing

A small showcase on how to test performance using WebdriverIO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'webdriver/build/request' error during 'npm test'

FelixZilber opened this issue · comments

commented

Error: Cannot find module 'webdriver/build/request' at Function.Module._resolveFilename (module.js:543:15) at Function.Module._load (module.js:470:25) at Module.require (module.js:593:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/felixzilber/dev/webdriverio-performance-testing/node_modules/webdriverio/src/commands/browser/reloadSession.js:23:1) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) at Function.Module._load (module.js:493:3) Error: Cannot find module 'webdriver/build/request' at Function.Module._resolveFilename (module.js:543:15) at Function.Module._load (module.js:470:25) at Module.require (module.js:593:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/felixzilber/dev/webdriverio-performance-testing/node_modules/webdriverio/src/commands/browser/reloadSession.js:23:1) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) at Function.Module._load (module.js:493:3)

@FelixZilber updated WebdriverIO beta version and it should work not. Please try again.

commented

@christian-bromann reproduce with updated dependencies

@FelixZilber what do you mean? Is the error still existing?

commented

@christian-bromann yes, with exact same error

@FelixZilber not sure but I don't see this issue:

➜  issues git clone webdriverio-performance-testing
Cloning into 'webdriverio-performance-testing'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 61 (delta 4), reused 7 (delta 4), pack-reused 49
Receiving objects: 100% (61/61), 54.66 KiB | 255.00 KiB/s, done.
Resolving deltas: 100% (26/26), done.
➜  issues cd webdriverio-performance-testing
➜  webdriverio-performance-testing git:(master) npm i

> fibers@3.1.1 install /Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing/node_modules/fibers
> node build.js || nodejs build.js

`darwin-x64-57` exists; testing
Binary is fine; exiting

> fsevents@1.2.4 install /Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing/node_modules/fsevents
> node install

[fsevents] Success: "/Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @wdio/local-runner@5.0.0-beta.13 requires a peer of @wdio/cli@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @wdio/devtools-service@5.0.0-beta.13 requires a peer of @wdio/cli@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @wdio/mocha-framework@5.0.0-beta.13 requires a peer of webdriverio@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @wdio/selenium-standalone-service@5.0.0-beta.13 requires a peer of @wdio/cli@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @wdio/spec-reporter@5.0.0-beta.13 requires a peer of @wdio/cli@^5.0.0 but none is installed. You must install peer dependencies yourself.

added 597 packages from 753 contributors and audited 6582 packages in 23.685s
found 0 vulnerabilities

➜  webdriverio-performance-testing git:(master) npm test

> webdriverio-performance-testing@0.0.1 test /Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing
> wdio

2018-12-05T13:55:50.754Z DEBUG wdio-config: wdio-sync found, running tests synchronous
2018-12-05T13:55:51.228Z DEBUG wdio-cli:run: Run suite with config /Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing/wdio.conf.js and params { _: [],
  '$0': '/Users/christianbromann/Sites/WebdriverIO/issues/webdriverio-performance-testing/node_modules/.bin/wdio' }
...
commented

@christian-bromann not working for me. Can you remove node_modules and lib folders before install?

@FelixZilber as you can see above I cloned the project fresh from NPM

commented

@christian-bromann I have node version 9.9.0 apparently it works with node 8.9.4