I am having huge problems trying to use bower (to install foundation 5) or get anything bower related to work on the command line.
I've installed
I've successfully ran
npm install -g bower grunt-cli gem install foundation and these have ran fine. I've looked in the npm/node_modules directory and I can see bower folder in there.
Every time I type bower either into the cmd, ruby cmd or git bash I get
command not recognized
I've set the git path in the environment variables.
What's annoying is the instruction on the bower site. It states:
npm install -g bower bower install Well this doesn't work!
Installing Bower Packages You can install packages with Bower the same way as you would install packages with npm. The difference is that you'll have to use the bower command instead. Bower will install the latest version of jQuery with this command. The additional --save flag tells Bower to add jQuery into your bower.
I bumped into this problem after npm install -g bower too. I solved the problem by adding npm's binary folder to my path.
Here are some helpful hints for doing that:
npm config get prefix. This path may look something like C:\Users\username\AppData\Roaming\npm (or C:\ProgramData\chocolatey\lib\nodejs.commandline.X.XX.XX\tools if you use Chocolatey).Add the path from step 1 to your Path.
Open the Windows Control Panel, search for environment, then click on either edit environment variables for your account, or Edit the system environment variables`.
Find the variable named Path or PATH, or create one if it doesn't exist.
Paste the path from step 1 here (; delimited).
You may need to restart your command prompt window.
You should now be able to enter bower commands.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With