1
votes

i tried to build atom.io and the build script finished without any errors. But when i try to run "./grunt install" i always get the following error:

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

So i tried the following commands as suggested on "http://gruntjs.com/getting-started":

sudo npm install grunt --save-dev

This delivers the following output:

andreas@debian ~/atom.io $ sudo npm install grunt --save-dev
npm http GET https://registry.npmjs.org/grunt
npm http 304 https://registry.npmjs.org/grunt
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/dateformat
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/exit
npm http GET https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/getobject
npm http GET https://registry.npmjs.org/grunt-legacy-util
npm http GET https://registry.npmjs.org/grunt-legacy-log
npm http 304 https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/hooker
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/eventemitter2
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/exit
npm http 304 https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/grunt-legacy-util
npm http 304 https://registry.npmjs.org/getobject
npm http 304 https://registry.npmjs.org/grunt-legacy-log
npm http 304 https://registry.npmjs.org/dateformat
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/underscore
[email protected] node_modules/grunt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

Then I run the second command:

npm install

Which gave me the following output:

andreas@debian ~/atom.io $ npm install

> [email protected] preinstall /home/andreas/atom.io
> node -e 'process.exit(0)'

Grunt is installed:

andreas@debian ~/atom.io $ grunt --version
grunt-cli v0.1.13
grunt v0.4.5

But the error doesn't go away i have googled very much but i can't find a working solution for this problem.

Best Regards

3

3 Answers

13
votes

I just got the same issue, npm update fixed it for me

0
votes

In order to have success running ./grunt install from script directory, you have to run:

script/grunt install

from the root atom directory.

bye :)

0
votes

you need to run this code in the project.

npm install grunt --save-dev