appium / appium-chromedriver

Node.js wrapper around Chromedriver
Apache License 2.0
66 stars 56 forks source link

appium-chromedriver npm install is not windows friendly #7

Closed juanpicado closed 9 years ago

juanpicado commented 9 years ago

Some scripts are not executable on Windows environments, this fails when you try to install Appium as well via npm.

npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.26","npm":"1.4.3"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.26","npm":"1.4.3"})

> appium-chromedriver@2.0.4 install C:\Users\xxxx\WebstormProjects\xxx\node_modules\appium\node_modules\appium-chromedriver
> $NODE ./bin/install-npm.js

'$NODE' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Error: ENOENT, lstat 'C:\Users\xxxx\WebstormProjects\xxxx\node_modules\appium\node_modules\appium-xcode\node_modules\babel-runtime\node_module
e.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

This part is not friendly for my Windows environment, Can we execute, for instance, gulp prepublish instead "$NODE ./node_modules/.bin/gulp prepublish"? And maybe everything else integrated into gulp it will be more friendly with Windows.

  "scripts": {
    "prepublish": "$NODE ./node_modules/.bin/gulp prepublish",
    "test": "./node_modules/.bin/gulp once",
    "watch": "./node_modules/.bin/gulp",
    "install": "$NODE ./bin/install-npm.js",
    "chromedriver": "./node_modules/.bin/gulp prepublish && node ./build/bin/install.js",
    "chromedriver_all": "./node_modules/.bin/gulp prepublish && node ./build/bin/install.js --all"
  },
sebv commented 9 years ago

Made some changes, could you retry with master? Wondering if the node shebang works on windows, or if I need to explicitely call node.

gulp prepublish does not work, it relies on global gulp install.

sebv commented 9 years ago

More change, should work on Windows now.

juanpicado commented 9 years ago

Yeah dude, it works fine now, the Appium installation has been fixed as well, thanks !