0

It's my first practical expirience in using of npm package manager so don't beat me : ). Running npm at windows 8 I faced with a error which could not fix.

That's what I got: npm error

As you can see, script throwed an error when faced with "." symbol. Think it's because windows does not support partial links like "./bla/blabla/blablabla". Also by some reason the path to webdriver-manager seems to be broken. It starts with 'C:\' and ends with './node' because the symbol '>' (dunno how to name it) separates them in two lines. Still do not understand how to fix it on windows 8. Suppose that webdriver-manager script thinks that './node_modules/protractor/bin/webdriver-manager' is the absolute path to this script.

cnishina
  • 5,016
  • 1
  • 23
  • 40

1 Answers1

0

This appears to be an old issue that hasn't been resolved. Hopefully this will help.

The error you are seeing comes from the "webdriver-manager-update" script in your package.json file. I imagine that your scripts tag looks something like:

"scripts" {
    "webdriver-manager-update": "./node_modules/protractor/bin/webdriver-manager update"
}

This would work on linux and mac but it will not work on a Windows machine. Packages that register an executable binary in their package.json (with the "bin" keyword) will register a symlink / shortcut in their "node_modules/.bin" folder. Node knows about this path so you just need to change your script to:

"scripts" {
    "webdriver-manager-update": "webdriver-manager update"
}

Then you can run it with: npm run webdriver-manager-update

If you need to launch this command from the file path without having a command registered in the "scripts" portion of your package.json, then you'll do something like:

node node_modules/protractor/bin/webdriver-manager update
cnishina
  • 5,016
  • 1
  • 23
  • 40