Closed blissdev closed 3 years ago
Hi @blissdev!
Yeah, we expect a global bower
and webdriver-manager
to run.
Maybe we should switch it to a postinstall
task that runs from the .bin
?
"scripts": {
"postinstall": "node_modules/.bin/bower install && node_modules/.bin/webdriver-manager update --versions.chrome=$(google-chrome --product-version)",
}
Unfortunately that doesn't work on Windows
'node_modules' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! boomerangjs@1.720.0 postinstall: `bower install && node_modules/.bin/webdriver-manager update --versions.chrome=$(google-chrome --product-version)`
npm ERR! Exit status 1
Seems NPM fixes the path for bower
, but then NPM tries to run the command after &&
and doesn't know to fix the path for webdriver-manager
.
Instead, this seems to work, by splitting it into two npm run
commands which don't need a ./node_modules/.bin/
prefix:
"scripts": {
...
"postinstall": "npm run bower-install && npm run webdriver-manager-update",
"bower-install": "./node_modules/.bin/bower install",
"webdriver-manager-update": "./node_modules/.bin/webdriver-manager update --versions.chrome=$(google-chrome --product-version)"
},
Thanks Nic!
Installing with NPM
npm install boomerangjs
fails because the postinstall instruction fails.From my npm install log:
It seems to me this install scripts make a lot of assumptions about the install location that may not be true. Would the project be open to dropping the install instruction?
Tested on: NPM v6.14.7