kurko / ember-sync

MIT License
282 stars 28 forks source link

npm install on ember-cli 0.0.39 fails #8

Closed tute closed 10 years ago

tute commented 10 years ago
client master % npm install --save ember-sync
npm WARN package.json ember-cli-ic-ajax@0.1.0 No repository field.
npm http GET https://registry.npmjs.org/ember-sync
npm http 304 https://registry.npmjs.org/ember-sync

> ember-sync@0.1.1 postinstall /Users/tute/Sites/agromentor/client/node_modules/ember-sync
> ./node_modules/bower/bin/bower install

sh: ./node_modules/bower/bin/bower: No such file or directory
npm ERR! ember-sync@0.1.1 postinstall: `./node_modules/bower/bin/bower install`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the ember-sync@0.1.1 postinstall script.
npm ERR! This is most likely a problem with the ember-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./node_modules/bower/bin/bower install
npm ERR! You can get their info via:
npm ERR!     npm owner ls ember-sync
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 13.2.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "install" "--save" "ember-sync"
npm ERR! cwd /Users/tute/Sites/agromentor/client
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/tute/Sites/agromentor/client/npm-debug.log
npm ERR! not ok code 0

Thank you for your work!

kurko commented 10 years ago

The package.json has specifies that bower install should be run after npm install. That doesn't make sense.

In your case, you can either install bower locally or just send a PR to modify the package.json file and remove this bower command. I'll try doing that myself when I get home. If you have some time, a patch is welcome :)

tute commented 10 years ago

Which package.json? Happy to help, but I'll need a little more guidance. Thanks for your quick response!

kurko commented 10 years ago

This line: https://github.com/kurko/ember-sync/blob/master/package.json#L18 Whenever you run npm install ember-sync, it'll run bower install. If you send a patch removing that line, it should be fixed.

I'll only have time to look into it myself tomorrow evening.

jakecraige commented 10 years ago

closed from that PR and when npm gets updated

john-kurkowski commented 9 years ago

The package.json has specifies that bower install should be run after npm install. That doesn't make sense.

@kurko, this is unrelated to the PR, but I arrived here from a Google search for the exact error message in another NPM package. For posterity, why doesn't it make sense?

jakecraige commented 9 years ago

@john-kurkowski The error message is simply saying the bower is not installed globally on your machine. You need to install it with npm install -g bower and the error should go away.

john-kurkowski commented 9 years ago

My case is the same as the original issue's:

./node_modules/bower/bin/bower: No such file or directory

Some other package is actually looking for bundled Bower, not global.

Regardless I'm not curious about how to fix the error. I'm curious why @kurko thought the npm install + bower install sequence doesn't make sense as a postinstall hook. It's the sequence ember-cli Getting Started requires, for example. Albeit they don't mention postinstall.