Wednesday, 4 September 2013

npm postinstall fails with multiple commands

npm postinstall fails with multiple commands

Inside my composer.json, there's a postinstall hook setup like the following:
"scripts" : {
"dist" : "node dist; node_modules/.bin/doccoh src/package.js",
"postinstall" : "node_modules/.bin/grunt setup || true;
node_modules/.bin/bower install",
"start" : "node server.js"
}
Whenever I run it (on Win from Git/Gnu Bash CLI), I end with
command not found. either the command was written wrong or couldn't be found
Rough translation from German CLI error.
I tried splitting it into multiple ;/semicolon separated parts and first
cd into that directory, but it simply ends up with the same error message.
Replacing the whole postinstall command set with a simple ls does work. So
I guess the problem might be the semicolon separation or a wrong usage of
commands. But overall I got no idea what's wrong.

No comments:

Post a Comment