webdriverio-boneyard / gulp-webdriver

gulp-webdriver is a gulp plugin to run selenium tests with the WebdriverIO testrunner
http://webdriver.io
MIT License
76 stars 33 forks source link

fixed path for wdio.cmd #31

Closed yoshi6jp closed 8 years ago

yoshi6jp commented 8 years ago

It is an error in the windows environment.

$ npm test

> gulp-webdriver@1.0.2 test d:\home\gulp-webdriver
> gulp webdriver

[16:46:36] Using gulpfile d:\home\gulp-webdriver\gulpfile.js
[16:46:36] Starting 'webdriver'...
module.js:339
    throw err;
    ^

Error: Cannot find module 'webdriverio\bin\wdio.cmd'
    at Function.Module._resolveFilename (module.js:337:15)

Fixed path for wdio.cmd.

webdriverio/bin -> webdriverio/../.bin (node_modules/.bin)
node_modules/.bin
  wdio          // shell
  wdio.cmd  // windows bat file

webdriverio/bin
  wdio         // node.js file
FennNaten commented 8 years ago

Hi, I ran into this issue as well. Problem is, this depends on your version of npm. On npm 2, which ships with node 4, (current LTS), the path will work as it is currently resolved. On npm 3 however, shipping with node 5, the new behavior is to flatten the dependency tree, causing the .cmd to go in a top-level .bin. Means there is probably a check to be made to correctly resolve the dependency according to the environment, though this feels a bit hacky :/

christian-bromann commented 8 years ago

This has already been fixed.