2014-02-06 3 views
0

grunt을 명령 줄에서 실행할 때 jshint 오류가 발생합니다.useminPrepare options 속성이 정의되지 않았습니다.

useminPrepare: { 
    html: '<%= yeoman.app %>/index.html', 
    options: { 
    dest: '<%= yeoman.dist %>' 
    } 
}, 

을 그리고 yeoman.dist는 grunt.initConfig에 정의되어있다 : 내 gruntfile에서

Running "useminPrepare:html" (useminPrepare) task 
    Going through public/index.html to update the config 
    Looking for build script HTML comment blocks 
    Warning: An error occurred while processing a template (Cannot read property 'options' of undefined). Use --force to continue. 

    Aborted due to warnings. 

내가 가진

yeoman: { 
    // configurable paths 
    app: require('./bower.json').appPath || 'public', 
    dist: 'dist' 
}, 

가 왜이 (가)의 특성 '옵션'을 읽을 수 없습니다 무엇입니까 정의되지 않은 오류?

답변

4

방금 ​​같은 문제가있었습니다. gruntfile에서 다른 작업을 잘못 구성했습니다. 개체를 정의하지 않은 다른 프로젝트에서 작업을 다시 사용했습니다. 내가 가진 다른 프로젝트에서

:이 프로젝트에 정의되지 않은

<%= yeoman.dist %>

.

그 밖의 무엇을 발견했는지 알아보기 위해 --debug --verbose --force과 함께 쓸데없는 소리를 내면서 발견했습니다. 고장난 작업에는 실수가있을 수 있습니다.

+0

감사합니다. 내게 같은 문제 :) – IgalSt