[IntelliJ][Grunt] process finished with exit code 99 오류 문제



IntelliJ v15.10



증상

프로젝트의 Gruntfile.js 파일을 이용해 Grunt Task 화면을 띄웠는데 아래와 같이 화면이 보여졌다.



1004lucifer

Failed to list grunt tasks in generator-ng-component/Gruntfile.js: process finished with exit code 99 (a non-zero exit code means an error)
 * Edit settings

$ /usr/bin/node /usr/local/lib/node_modules/grunt-cli/bin/grunt --no-color --verbose --gruntfile /source/angular/generator-ng-component/Gruntfile.js --tasks /devTools/idea-IU-143.2287.1/plugins/JavaScriptLanguage/grunt_js/tasks _intellij_grunt_tasks_fetcher
grunt-cli: The grunt command line interface. (v0.1.13)

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:

http://gruntjs.com/getting-started

Process finished with exit code 99








해결방법

Grunt Site(Link) 에 기술된 대로 해당 프로젝트의 Root Directory 에서 npm install 명령을 수행해 준다.




lucifer@lucifer-Vostro-V13:/source/angular/generator-ng-component$ npm install
npm WARN deprecated lodash@0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.

> spawn-sync@1.0.15 postinstall /source/angular/generator-ng-component/node_modules/yeoman-generator/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
yeoman-assert@2.1.1 node_modules/yeoman-assert
└── path-exists@1.0.0

chalk@0.4.0 node_modules/chalk
├── has-color@0.1.7
├── ansi-styles@1.0.0
└── strip-ansi@0.1.1

underscore.string@3.3.4 node_modules/underscore.string
├── util-deprecate@1.0.2
└── sprintf-js@1.0.3

chai@1.10.0 node_modules/chai
├── assertion-error@1.0.0
└── deep-eql@0.1.3 (type-detect@0.1.1)

grunt-release@0.7.0 node_modules/grunt-release
├── q@1.0.1
├── semver@2.0.11
├── shelljs@0.1.4
└── superagent@0.15.7 (methods@0.0.1, debug@0.7.4, cookiejar@1.3.0, qs@0.6.5, emitter-component@1.0.0, reduce-component@1.0.1, mime@1.2.5, formidable@1.0.14)

grunt-contrib-watch@0.6.1 node_modules/grunt-contrib-watch
├── async@0.2.10
├── tiny-lr-fork@0.0.5 (debug@0.7.4, faye-websocket@0.4.4, noptify@0.0.3, qs@0.5.6)
├── gaze@0.5.2 (globule@0.1.0)
└── lodash@2.4.2

grunt@0.4.5 node_modules/grunt
├── which@1.0.9
├── dateformat@1.0.2-1.2.3
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── colors@0.6.2
├── rimraf@2.2.8
├── async@0.1.22
├── hooker@0.2.3
├── grunt-legacy-util@0.2.0
├── exit@0.1.2
├── nopt@1.0.10 (abbrev@1.0.7)
├── minimatch@0.2.14 (sigmund@1.0.1, lru-cache@2.7.3)
├── glob@3.1.21 (inherits@1.0.2, graceful-fs@1.2.3)
├── lodash@0.9.2
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.2)
├── grunt-legacy-log@0.1.3 (grunt-legacy-log-utils@0.1.1, underscore.string@2.3.3, lodash@2.4.2)
└── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)

mocha@2.4.5 node_modules/mocha
├── escape-string-regexp@1.0.2
├── supports-color@1.2.0
├── growl@1.8.1
├── commander@2.3.0
├── diff@1.4.0
├── debug@2.2.0 (ms@0.7.1)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0)
└── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14)

grunt-mocha-test@0.10.2 node_modules/grunt-mocha-test
├── hooker@0.2.3
├── fs-extra@0.8.1 (jsonfile@1.1.1, rimraf@2.2.8, ncp@0.4.2, mkdirp@0.3.5)
└── mocha@1.18.2 (diff@1.0.7, growl@1.7.0, commander@2.0.0, mkdirp@0.3.5, debug@2.2.0, jade@0.26.3, glob@3.2.3)

lodash@3.10.1 node_modules/lodash

grunt-contrib-jshint@0.10.0 node_modules/grunt-contrib-jshint
├── hooker@0.2.3
└── jshint@2.5.11 (strip-json-comments@1.0.4, underscore@1.6.0, exit@0.1.2, minimatch@1.0.0, shelljs@0.3.0, console-browserify@1.1.0, cli@0.6.6, htmlparser2@3.8.3)

yeoman-generator@0.20.3 node_modules/yeoman-generator
├── read-chunk@1.0.1
├── detect-conflict@1.0.0
├── yeoman-welcome@1.0.1
├── path-exists@1.0.0
├── path-is-absolute@1.0.0
├── text-table@0.2.0
├── mime@1.3.4
├── user-home@2.0.0 (os-homedir@1.0.1)
├── xdg-basedir@2.0.0 (os-homedir@1.0.1)
├── class-extend@0.1.2 (object-assign@2.1.1)
├── istextorbinary@1.0.2 (binaryextensions@1.0.0, textextensions@1.0.1)
├── dargs@4.1.0 (number-is-nan@1.0.0)
├── nopt@3.0.6 (abbrev@1.0.7)
├── debug@2.2.0 (ms@0.7.1)
├── async@1.5.2
├── run-async@0.1.0 (once@1.3.3)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── shelljs@0.5.3
├── chalk@1.1.1 (escape-string-regexp@1.0.5, supports-color@2.0.0, strip-ansi@3.0.1, has-ansi@2.0.0, ansi-styles@2.2.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── through2@2.0.1 (xtend@4.0.1, readable-stream@2.0.5)
├── glob@5.0.15 (inherits@2.0.1, once@1.3.3, inflight@1.0.4, minimatch@3.0.0)
├── diff@2.2.1
├── findup-sync@0.2.1 (glob@4.3.5)
├── rimraf@2.5.2 (glob@7.0.3)
├── mem-fs-editor@2.2.0 (commondir@1.0.1, deep-extend@0.4.1, vinyl@1.1.1, globby@4.0.0, glob@6.0.4, multimatch@2.1.0, ejs@2.4.1)
├── dateformat@1.0.12 (get-stdin@4.0.1, meow@3.7.0)
├── pretty-bytes@2.0.1 (get-stdin@4.0.1, number-is-nan@1.0.0, meow@3.7.0)
├── github-username@2.1.0 (gh-got@2.4.0, meow@3.7.0)
├── cross-spawn@2.1.5 (cross-spawn-async@2.1.9, spawn-sync@1.0.15)
├── yeoman-environment@1.5.2 (escape-string-regexp@1.0.5, log-symbols@1.0.2, grouped-queue@0.3.2, untildify@2.1.0, mem-fs@1.1.2, globby@4.0.0, inquirer@0.11.4)
├── gruntfile-editor@1.1.0 (ast-query@1.1.0)
├── html-wiring@1.2.0 (detect-newline@1.0.3, cheerio@0.19.0)
├── download@4.4.3 (gulp-rename@1.2.2, object-assign@4.0.1, is-url@1.2.1, each-async@1.1.1, stream-combiner2@1.1.1, concat-stream@1.5.1, filenamify@1.2.0, read-all-stream@3.1.0, ware@1.3.0, vinyl@1.1.1, readable-stream@2.0.5, got@5.5.0, caw@1.2.0, gulp-decompress@1.2.0, vinyl-fs@2.4.2)
├── inquirer@0.8.5 (ansi-regex@1.1.1, figures@1.4.0, through@2.3.8, cli-width@1.1.1, readline2@0.1.1, rx@2.5.3)
└── sinon@1.17.3 (formatio@1.1.1, samsam@1.1.2, lolex@1.3.2, util@0.10.3)
lucifer@lucifer-Vostro-V13:/source/angular/generator-ng-component$




위와같이 작업 후 Grunt Task 에서 해당 파일을 새로고침 하면 아래와 같이 정상적으로 보여진다.




참조
http://gruntjs.com/getting-started#working-with-an-existing-grunt-project


댓글