I've been embarking on the wonderous journey of learning AngularJS for Salesforce, and I've been trying to work out how to install ngForce on my sandbox org. I've seen this question but as I don't have a commandline background, I'm struggling a bit with how and where to run the grunt deploy command mentioned by the inestimable Kevin Poorman.

I've got node.js installed on my PC, and I think I've "cloned the ngForce repo" on my own machine (I have the files downloaded in a directory, at any rate!). I have run the command npm install -g grunt-cli in my node.js command prompt - is this enough to use Grunt?

the ngForce directory on my local PC

As you can see above, I can see a JS file called "GruntFile" in the ngForce directory. But running the grunt deploy command in the node.js command prompt gives me the error: "Fatal error: unable to find local grunt."

enter image description here

I'm not sure whether I've installed Grunt in the wrong place, or if I need to do something else - any guidance gratefully received!

Thanks, Charlotte

1 Answer 1


I'm pretty sure you are not supposed to run grunt install.

From your project home directory, you should be running npm install to set it all up. To run grunt, you just use the commant grunt.

Here is the relevant section:

  • Change to the project's root directory.
  • Install project dependencies with npm install.
  • Run Grunt with grunt.

And the url here

  • Sorry, you're right - I mistyped both in the question and in the command prompt screengrab above. It should have read grunt deploy - and this also gets the same result. I'll updated the question. May 10, 2015 at 20:47
  • Aaah, the second point there was what I was missing - I hadn't installed npm in the project folder. Like I said, I'm a total noob to command line, I'm not even sure entirely what npm does. The command grunt deploy now gives me the option to enter username/pw/security token, but it's now erroring because it's not finding Ant. -headdesk- It has been an afternoon of learning... May 10, 2015 at 21:00
  • Apparently Ant is a bit of a beast to install on windows - you need to research how to do it for your specific version of windows. Good luck! If my answer did help, it's standard practise to "Accept" it - this will ensure your future questions get answered promptly :) May 10, 2015 at 21:38
  • Oh, btw, wish I could help with installing Ant, but I've got a mac... May 10, 2015 at 21:43
  • Yeah, it's turning out to be a bit of a pain. It probably would have been quicker at this rate to recreate all of the files in the ngForce repo as static resources and classes manually in Salesforce. I'm back at work tomorrow and am going to have to recreate all of these settings on my work PC, while battling the lack of admin rights all the way. Anyway, thanks for your help mate - you definitely gave me a leg up. May 10, 2015 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .