When you are working with windows and nodejs, then you might face this problem, whatever npn packages you install might not be accessible through commandline. By this I mean, is that, suppose you did:
npm install -g bower
And then executed :
bower install
Windows might give you an error that 'bower' is unrecognized.
A solution to the problem is to add npm global repository to your system path. To do so execute
npm config get prefix
To get the npm global repository path. Copy this path and follow following steps to add to windows path:
- On your computer, select Start->Settings->Control Panel->System:
- A "System Properties" dialog box will appear. Click it's Advanced tab:
- Click the Environment variables button:
- An Environment Variables dialog box will appear. In the System variables section, scroll down until you find the PATH variable. Select this variable:
- Click the Edit button to edit the value of this variable.
- At the end of the "Variable value:" box, add
;
- Click the OK button in each dialog box, until they have all disappeared.
Once, added you would have to restart command prompt and Hola! everythings works :)