Git Product home page Git Product logo

Comments (12)

FBerthelot avatar FBerthelot commented on June 12, 2024

I use the v1.0.1 too and i've the same issue. But i use only webdriverio in my project.

Thanks for the trick.

from gulp-webdriver.

christian-bromann avatar christian-bromann commented on June 12, 2024

@electricmonk @FBerthelot does it work with v1.0.0? On which platform are you running node?

from gulp-webdriver.

christian-bromann avatar christian-bromann commented on June 12, 2024

Seems that /^win/.test(process.platform) returns a wrong value / cc @mhoyer

from gulp-webdriver.

electricmonk avatar electricmonk commented on June 12, 2024

@christian-bromann nope. I added opts.wdioBin to the error message locally (might be a good idea to add it permanently) and it looked for the binary relative to gulp-webdriver rather than relative to the project root. And it was not installed there, but rather in the project root.

edit: Regarding your previous comment, I'm running 0.12.7 on OS X 10.10.4. v1.0.0 also doesn't work.

from gulp-webdriver.

FBerthelot avatar FBerthelot commented on June 12, 2024

@christian-bromann : For me it work with v1.0.0

I run my test on a kubuntu 14.04.

from gulp-webdriver.

silvenon avatar silvenon commented on June 12, 2024

v1.0.1 works fine for me. (OS X 10.10.5)

from gulp-webdriver.

jessebeach avatar jessebeach commented on June 12, 2024

I just ran into this as well. Specifying the path to wdioBin as @electricmonk suggested got me past this error and onto the next one!

from gulp-webdriver.

silvenon avatar silvenon commented on June 12, 2024

Ugh, I'm experiencing this issue as well now. Investigating…

from gulp-webdriver.

silvenon avatar silvenon commented on June 12, 2024

Ok, got it. The issue isn't caused by a specific change in webdriverio, it's caused by npm v3 flattening the dependency tree. So the binary is now located at node_modules/.bin/wdio, but gulp-webdriver is still searching at node_modules/gulp-webdriver/node_modules/.bin/wdio.

Anybody knows a reliable way to get the path to the executable?

from gulp-webdriver.

kmturley avatar kmturley commented on June 12, 2024

I had the same issue, using the following path didn't work either:

wdioBin: __dirname + '/node_modules/.bin/wdio'

because I was running my gulp tasks inside a child folder:

gulpfile.js
/gulp/tasks.js

This path worked for me, which is relative to the root directory:

wdioBin: './node_modules/.bin/wdio'

from gulp-webdriver.

FennNaten avatar FennNaten commented on June 12, 2024

Hi,
Looks like this issue is back on windows.
When the dependency tree is flattened, there correctly is a wdio file in node_modules/webdriverio/bin/ as well as in node_modules/.bin/, however the wdio.cmd can only be found in node_modules/.bin/.
So I get this error:

Cannot find module 'webdriverio\bin\wdio.cmd'
at Function.Module._resolveFilename (module.js:327:15)
at Function.require.resolve (internal/module.js:17:19)

I don't know if it comes from the way webdriver.io is published in latest version or from changes in npm, however I know that the problem only occurred when I upgraded node and npm (worked like a charm with node 4/npm 2).
It can be fixed in my case by pasting manually a modified wdio.cmd in webdriverio\bin but it's not pretty ^^'
However, I'm not sure it's possible to make a fix taking into account all combinations of os/npm versions

edit: I thought I could supply a different path through opts but it's not even the case in 1.0.2: it's the require.resolve which throws, and as it's called in every cases before merging the opts there's nothing I can do. So at the moment I had to revert back to 1.0.1 and then use:
wdioOpts = {wdioBin: require('path').join('./node_modules', '.bin', isWin ? 'wdio.cmd' : 'wdio')};
in my gulpfile as gulp-webdriver options. (working because I forced npm3 as engine and put the .gulpfile at the project root)

from gulp-webdriver.

kmturley avatar kmturley commented on June 12, 2024

The results are also different based on the version of webdriverio used. I'm using 2.4.5 to support webdrivercss:

npm uninstall webdriverio --save-dev
npm install [email protected] --save-dev

When using this version, I had to change gulp-webdriver index.js line to:

wdioBin = require.resolve(path.join('.bin', isWin ? 'wdio.cmd' : 'wdio'));

I would suggest gulp-webdriver should check for the version of webdriverio and modify it's approach!

from gulp-webdriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.