Ошибка Неустранимая ошибка: невозможно найти локальный grunt. при создании atom.io

я попытался собрать atom.io, и скрипт сборки завершился без ошибок. Но когда я пытаюсь запустить "./grunt install", я всегда получаю следующую ошибку:

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

Поэтому я попробовал следующие команды, предложенные на "http://gruntjs.com/getting-started:

sudo npm install grunt --save-dev

Это обеспечивает следующий вывод:

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])

Затем я запускаю вторую команду:

npm install

Что дало мне следующий вывод:

andreas@debian ~/atom.io $ npm install

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

Грант установлен:

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

Но ошибка не исчезает, я очень много гуглил, но не могу найти работающее решение этой проблемы.

С уважением


person Aragok    schedule 21.05.2014    source источник


Ответы (3)


У меня такая же проблема, npm update исправил ее за меня.

person Paul    schedule 21.05.2014
comment
Я попробовал обновление npm сейчас, и это не решает проблему. Но обновление npm завершается без ошибок. Вы что-то еще в дополнение? - person Aragok; 21.05.2014

Чтобы успешно запустить ./grunt install из каталога скриптов, вам нужно запустить:

установка скрипта/ворчания

из корневого каталога атома.

до свидания :)

person Marbal    schedule 13.06.2014

вам нужно запустить этот код в проекте.

npm install grunt --save-dev
person Community    schedule 23.12.2015