{"id":2160,"date":"2017-12-07T12:01:16","date_gmt":"2017-12-07T12:01:16","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2160"},"modified":"2021-02-27T09:29:15","modified_gmt":"2021-02-27T09:29:15","slug":"fatal-error-unable-to-find-local-grunt","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/","title":{"rendered":"Fatal error: Unable to find local grunt."},"content":{"rendered":"<p><strong>scmuser created the topic: Fatal error: Unable to find local grunt.<\/strong><br \/>\nI am getting following error&#8230;<\/p>\n<p>grunt lite<br \/>\ngrunt-cli: The grunt command line interface. (v0.1.9)<\/p>\n<p>Fatal error: Unable to find local grunt.<\/p>\n<p>If you&#8217;re seeing this message, either a Gruntfile wasn&#8217;t found or grunt<br \/>\nhasn&#8217;t been installed locally to your project. For more information about<br \/>\ninstalling and configuring grunt, please see the Getting Started guide:<\/p>\n<p>gruntjs.com\/getting-started <\/p>\n<p>Solution<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>So first install the grunt cli tools globally:<\/p>\n<p>npm install -g grunt-cli<\/p>\n<p>(or possibly sudo npm install -g grunt-cli ).<\/p>\n<p>You can establish that&#8217;s working by typing grunt &#8211;version<\/p>\n<p>Now you can install the current version of Grunt local to your project. So from your project&#8217;s location&#8230;<\/p>\n<p>npm install grunt &#8211;save-dev<\/p>\n<p>The save-dev switch isn&#8217;t strictly necessary but is a good idea because it will mark grunt in its package.json devDependencies section as a development only module.<\/p>\n<p><strong>rajeshkumar replied the topic: Fatal error: Unable to find local grunt.<\/strong><br \/>\nwhile running &#8220;npm install -g grunt-cli&#8221;, i got following code&#8230;<\/p>\n<p>npm http GET<a href=\"http:\/\/registry.npmjs.org\/grunt-cli\"> registry.npmjs.org\/grunt-cli <\/a><br \/>\nnpm http 304 <a href=\"http:\/\/registry.npmjs.org\/grunt-cli\">registry.npmjs.org\/grunt-cli <\/a><\/p>\n<p>npm ERR! Error: No compatible version found: grunt-cli<br \/>\nnpm ERR! No valid targets found.<br \/>\nnpm ERR! Perhaps not compatible with your version of node?<br \/>\nnpm ERR! at installTargetsError (\/usr\/share\/npm\/lib\/cache.js:488:10)<br \/>\nnpm ERR! at next_ (\/usr\/share\/npm\/lib\/cache.js:438:17)<br \/>\nnpm ERR! at next (\/usr\/share\/npm\/lib\/cache.js:415:44)<br \/>\nnpm ERR! at \/usr\/share\/npm\/lib\/cache.js:408:5<br \/>\nnpm ERR! at saved (\/usr\/share\/npm\/lib\/utils\/npm-registry-client\/get.js:147:7)<br \/>\nnpm ERR! at Object.oncomplete (\/usr\/lib\/nodejs\/graceful-fs.js:230:7)<br \/>\nnpm ERR! You may report this log at:<br \/>\nnpm ERR! < bugs.debian.org\/npm ><br \/>\nnpm ERR! or use<br \/>\nnpm ERR! reportbug &#8211;attach \/home\/scmbuild\/npm-debug.log npm<br \/>\nnpm ERR!<br \/>\nnpm ERR! System Linux 3.2.0-53-generic<br \/>\nnpm ERR! command &#8220;node&#8221; &#8220;\/usr\/bin\/npm&#8221; &#8220;install&#8221; &#8220;-g&#8221; &#8220;grunt-cli&#8221;<br \/>\nnpm ERR! cwd \/home\/scmbuild<br \/>\nnpm ERR! node -v v0.6.12<br \/>\nnpm ERR! npm -v 1.1.4<br \/>\nnpm ERR! message No compatible version found: grunt-cli<br \/>\nnpm ERR! message No valid targets found.<br \/>\nnpm ERR! message Perhaps not compatible with your version of node?<br \/>\nnpm ERR!<br \/>\nnpm ERR! Additional logging details can be found in:<br \/>\nnpm ERR! \/home\/scmbuild\/npm-debug.log<br \/>\nnpm not ok<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>rajeshkumar replied the topic: Fatal error: Unable to find local grunt.<\/strong><br \/>\nSeems like node is older version so need to user latest&#8230;<br \/>\nHow to upgrade nodes in Ubantu<br \/>\nInstall the dependencies:<\/p>\n<p>sudo apt-get install g++ curl libssl-dev apache2-utils<br \/>\nsudo apt-get install git-core<\/p>\n<p>Run the following commands:<\/p>\n<p>git clone git:\/\/github.com\/ry\/node.git<br \/>\ncd node<br \/>\n.\/configure<br \/>\nmake<br \/>\nsudo make install<\/p>\n<p>How to install grunt<br \/>\nHere&#8217;s what I did to fix this:<\/p>\n<p>Uninstalled grunt globally:<\/p>\n<p>npm uninstall -g grunt<\/p>\n<p>Installed grunt-cli globally:<\/p>\n<p>npm install -g grunt-cli<\/p>\n<p>Then, in project root dir:<\/p>\n<p>npm install<\/p>\n<p>And all is good. Hope this works for anyone else running into this.<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>rajeshkumar replied the topic: Fatal error: Unable to find local grunt.<\/strong><br \/>\nAfter running latest nodes, while using folliowing commands i got following error&#8230;&#8221;npm install -g grunt-cli&#8221;<\/p>\n<p>module.js:333<br \/>\nthrow err;<br \/>\n^<br \/>\nError: Cannot find module &#8216;graceful-fs&#8217;<br \/>\nat Function.Module._resolveFilename (module.js:331:15)<br \/>\nat Function.Module._load (module.js:273:25)<br \/>\nat Module.require (module.js:357:17)<br \/>\nat require (module.js:373:17)<br \/>\nat Object.<anonymous> (\/usr\/share\/npm\/lib\/utils\/ini.js:32:10)<br \/>\nat Module._compile (module.js:449:26)<br \/>\nat Object.Module._extensions..js (module.js:467:10)<br \/>\nat Module.load (module.js:349:32)<br \/>\nat Function.Module._load (module.js:305:12)<br \/>\nat Module.require (module.js:357:17)<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>rajeshkumar replied the topic: Fatal error: Unable to find local grunt.<\/strong><br \/>\nFrom in stacekoverlfow..<\/p>\n<p>Don&#8217;t download npm from aptitude or apt-get. Instead try:<\/p>\n<p>git clone git:\/\/github.com\/isaacs\/npm.git<br \/>\ncd npm\/scripts<br \/>\nchmod +x install.sh<br \/>\nsudo .\/install.sh<\/p>\n<p>saw it here: NPM can&#8217;t install appjs. Error: Cannot find module &#8216;graceful-fs&#8217;<\/p>\n<p>or<\/p>\n<p>sudo npm install<\/p>\n<p>or<\/p>\n<p>sudo apt-get remove npm<br \/>\nsudo apt-get install npm<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: Fatal error: Unable to find local grunt. I am getting following error&#8230; grunt lite grunt-cli: The [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[451],"tags":[129],"class_list":["post-2160","post","type-post","status-publish","format-standard","hentry","category-other-build-tools","tag-grunt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fatal error: Unable to find local grunt. - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fatal error: Unable to find local grunt. - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"scmuser created the topic: Fatal error: Unable to find local grunt. I am getting following error&#8230; grunt lite grunt-cli: The [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-07T12:01:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:29:15+00:00\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Fatal error: Unable to find local grunt.\",\"datePublished\":\"2017-12-07T12:01:16+00:00\",\"dateModified\":\"2021-02-27T09:29:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/\"},\"wordCount\":739,\"commentCount\":0,\"keywords\":[\"Grunt\"],\"articleSection\":[\"Other build Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/\",\"name\":\"Fatal error: Unable to find local grunt. - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"datePublished\":\"2017-12-07T12:01:16+00:00\",\"dateModified\":\"2021-02-27T09:29:15+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/fatal-error-unable-to-find-local-grunt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fatal error: Unable to find local grunt.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fatal error: Unable to find local grunt. - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/","og_locale":"en_US","og_type":"article","og_title":"Fatal error: Unable to find local grunt. - scmGalaxy","og_description":"scmuser created the topic: Fatal error: Unable to find local grunt. I am getting following error&#8230; grunt lite grunt-cli: The [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/","og_site_name":"scmGalaxy","article_published_time":"2017-12-07T12:01:16+00:00","article_modified_time":"2021-02-27T09:29:15+00:00","author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Fatal error: Unable to find local grunt.","datePublished":"2017-12-07T12:01:16+00:00","dateModified":"2021-02-27T09:29:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/"},"wordCount":739,"commentCount":0,"keywords":["Grunt"],"articleSection":["Other build Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/","name":"Fatal error: Unable to find local grunt. - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"datePublished":"2017-12-07T12:01:16+00:00","dateModified":"2021-02-27T09:29:15+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/fatal-error-unable-to-find-local-grunt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Fatal error: Unable to find local grunt."}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/2160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=2160"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/2160\/revisions"}],"predecessor-version":[{"id":2161,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/2160\/revisions\/2161"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=2160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=2160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=2160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}