Fatal error: Unable to find local grunt.

scmuser created the topic: Fatal error: Unable to find local grunt.
I am getting following error…

grunt lite
grunt-cli: The grunt command line interface. (v0.1.9)

Fatal error: Unable to find local grunt.

If you’re seeing this message, either a Gruntfile wasn’t found or grunt
hasn’t been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

gruntjs.com/getting-started

Solution

The command line tools are not included with the latest version of Grunt (0.4 at time of writing) instead you need to install them separately.

This is a good idea because it means you can have different versions of Grunt running on different projects but still use the nice concise grunt command to run them.

So first install the grunt cli tools globally:

npm install -g grunt-cli

(or possibly sudo npm install -g grunt-cli ).

You can establish that’s working by typing grunt –version

Now you can install the current version of Grunt local to your project. So from your project’s location…

npm install grunt –save-dev

The save-dev switch isn’t strictly necessary but is a good idea because it will mark grunt in its package.json devDependencies section as a development only module.

rajeshkumar replied the topic: Fatal error: Unable to find local grunt.
while running “npm install -g grunt-cli”, i got following code…

npm http GET registry.npmjs.org/grunt-cli
npm http 304 registry.npmjs.org/grunt-cli

npm ERR! Error: No compatible version found: grunt-cli
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! < bugs.debian.org/npm >
npm ERR! or use
npm ERR! reportbug –attach /home/scmbuild/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-53-generic
npm ERR! command “node” “/usr/bin/npm” “install” “-g” “grunt-cli”
npm ERR! cwd /home/scmbuild
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: grunt-cli
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/scmbuild/npm-debug.log
npm not ok
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Fatal error: Unable to find local grunt.
Seems like node is older version so need to user latest…
How to upgrade nodes in Ubantu
Install the dependencies:

sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core

Run the following commands:

git clone git://github.com/ry/node.git
cd node
./configure
make
sudo make install

How to install grunt
Here’s what I did to fix this:

Uninstalled grunt globally:

npm uninstall -g grunt

Installed grunt-cli globally:

npm install -g grunt-cli

Then, in project root dir:

npm install

And all is good. Hope this works for anyone else running into this.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Fatal error: Unable to find local grunt.
After running latest nodes, while using folliowing commands i got following error…”npm install -g grunt-cli”

module.js:333
throw err;
^
Error: Cannot find module ‘graceful-fs’
at Function.Module._resolveFilename (module.js:331:15)
at Function.Module._load (module.js:273:25)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object. (/usr/share/npm/lib/utils/ini.js:32:10)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Fatal error: Unable to find local grunt.
From in stacekoverlfow..

Don’t download npm from aptitude or apt-get. Instead try:

git clone git://github.com/isaacs/npm.git
cd npm/scripts
chmod +x install.sh
sudo ./install.sh

saw it here: NPM can’t install appjs. Error: Cannot find module ‘graceful-fs’

or

sudo npm install

or

sudo apt-get remove npm
sudo apt-get install npm
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Grunt Courses and Training | Grunt Training | Grunt Course | Online | Classroom | India

 

grunt-course-and-training

Grunt is everywhere. JavaScript projects from jQuery to Twitter Bootstrap use Grunt to convert code, run tests, and produce distributions for production. It’s a build tool in the spirit of Make and Rake, but written with modern apps in mind.This training gets you up to speed with Grunt using practical hands-on examples, so you can wrangle your projects with ease. You’ll learn how to create and maintain tasks and project builds, and automate your workflow with plugins and custom tasks.

Course outline as following…

Introducing Grunt

  • What is Grunt?
  • Why use Grunt?
  • Benefits of Grunt
  • Real-world use cases
  • Minification
  • Concatenation
  • Deployment
  • Lab and example

Setting Up Grunt

  • Installation
  • Project setup
  • Configuring tasks
  • Lab and example

Using Grunt

  • Creating your own tasks
  • Running tasks
  • Using third-party tasks
  • Lab and example

Grunt in Action

  • Creating the build
  • Lab and example

Advanced Grunt

  • Testing with Grunt
  • Continuous integration with Grunt
  • External tasks
  • Grunt plugins
  • JavaScript resources
  • Development tools
  • Lab and example

About us:
scmGalaxy online platform is a community initiatives based on Software configuration management and DevOps that helps members and organizations to optimize their software development process, advocating agile methodologies and improve productivity across all aspects of Application lifecycle management. We provide consulting, training and mentoring services in agile development practices such as Source Code Management, Continuous Integration, Build management, Test-Driven development, Acceptance-Test driven development, Build automation, code quality practices and automated testing and continuous delivery.

We provide job oriented training in the area of Software Configuration management, Build and Release Engineering and DevOps domain . Candidates with engineering or software background and looking to either start or change their career to Build and Release Engineering, would benefit most from this training. This course offered online around the globe which include India, USA, Europe, Australia, Bangalore, Delhi, Pune, Mumbai, Chennai and Hydrabad. Instructor is an expert in Software configuration management, Build and release engineering and DevOps with more than 10 years industry experience in India.

Contact us at

  • Mail – info@scmGalaxy.com
  • Call – +91 700 483 5930
  • Skype – scmGalaxy
  • WhatsApp – +91 700 483 5930

Course Objectives
To bring your team up to speed with agile development, We can also run the from Continuous Integration to Continuous Delivery with automated course within your premises.
Course Schedule
This course is an intensive 1-day & 2-day workshop with a mixture of teaching and lab exercises. Currently, this course is offered exclusively as an on-line course. Please contact us for more details.
Audience
This is a hands-on, practical course designed to teach specialized skills for real-world development situations. It is thus primarily aimed at a SCM Engineer, Build/Release Engineer, DevOps engineer and developer and QA audience.
Approach
The course is modular and flexible – depending on specific student needs and requests. Through our trainings, you benefit from the wide experience and architectural expertise of our team. We bring that experience to you in an highly interactive, intensely hands-on setting.
Assumptions
We assume participants have a reasonable understanding of Development in any language as well as a basic understanding of the Software Development Life Cycle.
Lab Work
All our courses are above all practical in nature. We believe that the best way to learn is by doing. So the course contains approximately 80% lab work.
Learning Resources
Each registrant will receive a copy of the student notes and lab solutions, a certificate of completion, and a CD containing all the tools covered in the course and CD containing all the tools covered in the course.
Contact Us
This course is provided on-site, and can be tailored to your particular requirements. If you would like our training delivered at your premises, or for any additional information please contact us.

Contact Info

  • Mail – info@scmGalaxy.com
  • Call – +91 700 483 5930
  • Skype – scmGalaxy
  • WhatsApp – +91 700 483 5930

Tagged : / / / / / / / / / / / / / / / / / / / / /