Grunt -> RangeError로 CoffeEScript 컴파일 : 최대 통화 스택 크기 초과
-
11-12-2019 - |
문제
rtrunt-contrib-confir 플러그인.그러나 grunt coffee
를 실행하면 항상이 오류가 발생합니다.
RangeError: Maximum call stack size exceeded
.
이것은 내 grunt.js 파일입니다 :
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
meta: {
version: '0.1.0',
banner: '/*! PROJECT_NAME - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://PROJECT_WEBSITE/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'YOUR_NAME; Licensed MIT */'
},
lint: {
files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js']
},
qunit: {
files: ['test/**/*.html']
},
concat: {
dist: {
src: ['<banner:meta.banner>', '<file_strip_banner:lib/FILE_NAME.js>'],
dest: 'dist/FILE_NAME.js'
}
},
min: {
dist: {
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
dest: 'dist/FILE_NAME.min.js'
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint qunit'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
browser: true
},
globals: {}
},
uglify: {},
coffee: {
compile: {
files: {
'javascript/result.js': 'lib/grayScott.coffee'
}
}
}
});
// Default task.
grunt.registerTask('default', 'lint qunit concat min');
grunt.registerTask('coffee', 'coffee');
};
. 해결책
grunt.js 파일에 다음 행을 추가하여 grunt-contrib-coffee
태스크 (태스크가 설치된 후, 즉 npm install grunt-contrib-coffee
:
grunt.loadNpmTasks('grunt-contrib-coffee');
다음 줄을 꺼냅니다. grunt.registerTask('coffee', 'coffee');
.그 선은 커피 작업을 자체로 등록하려고 시도하고 RangeError
의 가능성이있는 원인입니다.
제휴하지 않습니다 StackOverflow