Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

bower is not found when doing bower update but it did install the packages in the npm install step #383

Closed
LJNielsenDk opened this issue Nov 19, 2016 · 3 comments

Comments

@LJNielsenDk
Copy link

LJNielsenDk commented Nov 19, 2016

Am I supposed to add it to the path myself or should it just work? If the former, the guide should probably mention this.

I'm on Windows 10 using node v7.0.0 and running the commands in it's Node.js command prompt.

I have tried running bower update in the same Node.js command prompt as npm install and a new one opened after that step.

Am I doing/expecting something silly, is something broken, or does the guide need updating?

@deminyx
Copy link

deminyx commented Nov 19, 2016

Got the same problem a few minutes ago...

@gkalpak
Copy link
Member

gkalpak commented Nov 21, 2016

In order to avoid poluting your global packages or suffer from version-mismatch issues, angular-seed does not rely on a global bower installation. If you want to be able to run bower <command> directly from the terminal, you can install bower globally with npm install --global bower (but it is not necessary for angular-seed).

Instead, angular-seed installs and runs bower locally (as a local npm dependency). The project is set up to automatically run bower install right after npm install, so you don't have to manually run it. The reason this works from within the post-install npm script, is that npm scripts can also find local executables; i.e. those in node_modules/.bin/.

If you want to manually run bower without a global installation, you can run node_modules/.bin/bower.cmd <command> from inside the projects root directory.

Closing, since everything works as intended.

@gkalpak gkalpak closed this as completed Nov 21, 2016
@gkalpak
Copy link
Member

gkalpak commented Nov 21, 2016

I just realized we suggest running bower update in README as a way to update bower dependencies. That will clearly not work unless bower is installed globally. I will submit a PR with a fix shortly.

@gkalpak gkalpak reopened this Nov 21, 2016
gkalpak added a commit to gkalpak/angular-seed that referenced this issue Nov 21, 2016
Previously, is was suggested to run `bower update`, which would only work if `bower` was globally
installed. Since a global `bower` installation should not be a prerequisit for the seed project, it
is now possible to update bower dependencies via the new `update-deps` npm script.

Fixes angular#383
gkalpak added a commit to gkalpak/angular-seed that referenced this issue Nov 21, 2016
Previously, is was suggested to run `bower update`, which would only work if `bower` was globally
installed. Since a global `bower` installation should not be a prerequisite for the seed project, it
is now possible to update bower dependencies via the new `update-deps` npm script.

Fixes angular#383
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants