2013-03-28 2 views
1

그래서`npm install -g grunt-cli '와 같이 Grunt를 설치했습니다. Grunt concat가 "로컬 툴툴을 찾을 수 없습니다"

는 또한 성공적으로 꿀꿀 거리는 소리-있는 contrib-CONCAT의 libary를 설치과 같이 한 : npm install grunt-contrib-concat --save-dev

나는 package.json 만들었습니다

{ 
    "name": "my-project-name", 
    "version": "0.1.0", 
    "devDependencies": { 
    "grunt": "~0.4.1", 
    "grunt-contrib-jshint": "~0.1.1", 
    "grunt-contrib-nodeunit": "~0.1.2" 
    } 
} 

Gruntfile.js :

module.exports = function(grunt) { 

grunt.initConfig({ 
    pkg: grunt.file.readJSON('package.json'), 
    concat: { 
    options: { 
     separator: ';' 
    }, 
    dist: { 
     src: ['src/init.js', 'src/Game.js', 'ui/Ui.js', 'ui/AddBTS.js', 'ui/Toolbar.js'], 
     dest: 'built.js' 
    } 
    } 
}); 

grunt.loadNpmTasks('grunt-contrib-concat'); 

}; 

을 지금 때 grunt concat 다음 오류가 발생합니다.

치명적인 오류 : 로컬 툴툴 거리는 것을 찾을 수 없습니다. 이 메시지가 표시되면 Gruntfile을 찾을 수 없거나 grunt 이 로컬 프로젝트에 설치되어 있지 않습니다. 툴툴 설치 및 구성에 대한 자세한 내용은 시작 안내서를 참조하십시오.

이것은 처음 Grunt를 사용하는 것으로 2 시간 이상이 문제를 해결하기 위해 노력했습니다. 누군가가 나를 도우 려하고 내가 올바르게 설정하지 않은 것을 조언 해 줄 수 있습니까?

미리 감사드립니다.

답변

3

Grunt가 프로젝트 폴더 (grunt-cli와 다른)에 로컬로 설치되지 않았을 가능성이 큽니다. 패키지에 넣었습니다 .json이므로 npm install 또는 npm install grunt을 사용해보십시오.

Note that installing grunt-cli does not install the grunt task runner! The job of the grunt CLI is simple: run the version of grunt which has been installed next to a Gruntfile . This allows multiple versions of grunt to be installed on the same machine simultaneously.

:

자세한 내용은 getting started 페이지를 참조하십시오

관련 문제