Error: Cannot find where you keep your Bower packages. Use --force to continue

前端 未结 6 1862
陌清茗
陌清茗 2020-12-28 18:18

I\'m building an App using MEAN Stack and trying to scaffold my frontend using yeoman-generator, when I do yo angular it f

相关标签:
6条回答
  • 2020-12-28 18:37

    I got the same error on

    grunt serve.

    It was solved when i tried

    npm install --global yo bower grunt-cli 
    
    npm install -g generator-angular
    
    yo angular
    
    grunt serve
    

    if you get an error:-

    Running "wiredep:app" (wiredep) task

    Warning: Error: angular is not installed

    . Try running bower install

    0 讨论(0)
  • 2020-12-28 18:39

    Put .bowerrc file inside of bower.json file directory.

    It must be contain :

    {
        "directory": "client/bower_components"
    }
    

    It may be your problem.

    0 讨论(0)
  • 2020-12-28 18:41

    Just run bower install and your code will run.

    0 讨论(0)
  • 2020-12-28 18:51

    For me it seemed to be link with the rights.
    I had to manually create the bower_components folder:

    mkdir -m 777 client/bower_components   
    

    and run

    bower install
    
    0 讨论(0)
  • 2020-12-28 18:51

    I just got the error.

    The solution for me was to add the bower_components folder on the root folder even if I did not have bower dependencies yet.

    0 讨论(0)
  • 2020-12-28 18:59

    The Node version seems to be outdated and both the npm and nodejs is not installed globally:

    To install globally run the following:

    npm install --global yo bower grunt-cli 
    npm install -g generator-angular
    

    And start again, it will work for sure.

    0 讨论(0)
提交回复
热议问题