Grunt Assemble无法读取属性'Stage'

时间:2014-07-09 04:06:30

标签: javascript gruntjs assemble

在项目上运行一个非常简单的Assemble任务,但我在默认的grunt任务中收到以下错误:

Running "assemble:site" (assemble) task Warning: Cannot read property 'stage' of undefined Use --force to continue.

目前正在运行(通过package.json):

"assemble": "^0.4.41" "grunt": "^0.4.5",

我的Gruntfile中的汇编任务:

assemble: {
    options: {
        assets: '<%= site.assets %>',
        flatten: true,
        production: false,

        // Metadata
        pkg: '<%= pkg %>',
        site: '<%= site %>',

        // Template Config
        partials: '<%= site.includes %>',
        layoutdir: '<%= site.layouts %>',
        layout: '<%= site.layout %>'
    },
    site: {
        files: {'<%= site.root %>/': ['<%= site.templates %>/pages/*.hbs']}
    }
},

如果有帮助,这里也是我的config.yml文件:

# =============================================
# Build config
# =============================================

# Root Distribution
root:        _gh_pages

# Templates
templates:        templates
includes:         <%= site.templates %>/includes/*.hbs
layouts:          <%= site.templates %>/layouts  
layout:           default.hbs

# Assets Dir
assets:     <%= site.root %>/assets

# =============================================
# Site metadata 
# =============================================

title:      Feast Finder

2 个答案:

答案 0 :(得分:2)

cd进入[PROJECT] / node_modules /汇编并运行npm install resolve-dep@0.4.1

这是一个临时修复,如here所述。

答案 1 :(得分:0)

问题由Assemble团队解决。