Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grunt serve from a fresh Yeoman install returns - Warning: Task "serve" not found

After running yo angular and then cd'ing into the application's root folder (at same level as the app folder, gruntfile, package.json etc) I try grunt serve and I get the above error. Grunt won't start a server for me.

I have searched all over but couldn't find say to run npm install and bower install within the application's root directory, which I have tried but still the same error.

I've updated and checked bower/grunt/npm and they're all good.

Any suggestions please?

like image 898
bitfidget Avatar asked Jul 21 '14 05:07

bitfidget


1 Answers

I think I have found a solution!

http://yang-wei.github.io/blog/2014/06/01/npm-install-issues-plus-angularjs-set-up/

Running sudo on all the installs causes issues on the NPM folder in the home directory. I needed to change permissions of all usr/local folders by running:

sudo chown -R $USER /usr/local

sudo chown -R `whoami` ~/.npm

npm install -g yo grunt-cli bower

Now I go through the process again and no more errors!

The above link also seems to be pulled together from a bunch of answers at npm throws error without sudo

like image 54
bitfidget Avatar answered Sep 17 '22 09:09

bitfidget