bower command not found windows

前端 未结 10 1171
谎友^
谎友^ 2020-12-02 05:21

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

  • ruby
10条回答
  •  心在旅途
    2020-12-02 05:52

    in case this helps.

    I'm a npm / bower nooB - but what happened in my case was, that I was using the Angular JS tutorial, which seems to have bower set up to be used via npm, and NOT via the command line directly.

    Note: in my case I think my bower install got messed up. I ran this to fix up my bower install:

    npm install -gf bower
    

    Then I edited my bower.json file to add in a new library that I wanted to use (in my case angular-sanitize)

    I CD to the location of my project

    cd myProjectPath
    

    Then to run bower, I actually used npm install:

    npm install
    

    This seems to to run bower as a node package, which in turn scans bower.json and installs any missing bower packages.

    To run bower as a npm package, add npm before the bower command:

    npm bower -v
    

    hope this helps,

    Sean

提交回复
热议问题