Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bower install necessary in postinstall? #6

Closed
pogopaule opened this issue Aug 25, 2014 · 5 comments
Closed

bower install necessary in postinstall? #6

pogopaule opened this issue Aug 25, 2014 · 5 comments

Comments

@pogopaule
Copy link

I have to run npm install in a ember-cli project as root. A bower install with root rights causes some trouble. I'd rather call bower install myself with bower install --allow-root --config.interactive=false

Note that ember-cli once did the same and removed bower install in postinstall: ember-cli/ember-cli@01c16b4

Here is a short snippet of what npm screams at me when ember-cli-qunit runs bower install:

==> dev: bower ESUDO         Cannot be run with sudo
==> dev:
==> dev: Additional error details:
==> dev: Since bower is a user command, there is no need to execute it with superuser permissions.
==> dev: If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
==> dev:
==> dev: http://www.joyent.com/blog/installing-node-and-npm
==> dev: https://gist.github.com/isaacs/579814
==> dev:
==> dev: You can however run a command with sudo using --allow-root option
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:  [email protected] postinstall: `bower install`
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:  Exit status 1
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:  Failed at the [email protected] postinstall script.
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:  This is most likely a problem with the ember-cli-qunit package,
==> dev: npm
==> dev:
==> dev: ERR!
==> dev:  not with npm itself.
==> dev: npm

...

@jakecraige
Copy link
Member

There is a known problem that installing ember-cli/npm with sudo, information found here The solution to your problem would be to set up node/npm so they don't need to run with sudo.

We can't just remove the bower install, this project would not install successfully so it is necessary to have it. If you have another solution I'd be happy to look at it.

Also, the reason it was removed from ember-cli was that the init command already does it, relevant code found here

@pogopaule
Copy link
Author

ok thank you for your quick answer!

@stefanpenner
Copy link
Contributor

@jakecraige this postInstall is causing all kinds of annoying output. Can you move it to a pre-publish hook instead? This would also improve reliability of installing this addon.

related: ember-cli/ember-cli#1746

@rwjblue
Copy link
Member

rwjblue commented Aug 26, 2014

@stefanpenner - how would prepublish help?

@rwjblue
Copy link
Member

rwjblue commented Aug 26, 2014

Also, the point is to not have the npm package contain the vendored code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants