Cannot use grunt on simple Yeoman angular

前端 未结 3 408
孤独总比滥情好
孤独总比滥情好 2021-02-04 15:35

Trying to just startup a simple angular app via Yeoman, using steps in this guide http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/

3条回答
  •  盖世英雄少女心
    2021-02-04 16:26

    I just encountered the same problem today, managed to resolve it with the answers here.

    Basically I needed to update npm to latest version, by using this command (the npm which came with Node-v0.10.29 package was outdated)

    npm update npm -g
    

    or

    sudo npm update npm -g (i used this command on my mac)
    

    Then type this command

    npm --version (it should show 1.5.0-alpha-4 or later version)
    

    Then type the grunt serve command

    grunt serve
    

    If you still have issues, then try running these commands

    npm install 
    

    or

    sudo npm install (i used this command on my mac)
    

    Then try grunt serve command again,

    grunt serve
    

    This time, it worked for me.

    If it didn't, then try this command

    bower install (i did not have to use this command)
    

提交回复
热议问题