welldan97 / assemble-jade

MIT License
2 stars 1 forks source link

Error loading engine #2

Closed doertedev closed 10 years ago

doertedev commented 10 years ago

(grunt -v)

Running "assemble:normal_pages" (assemble) task
Verifying property assemble.normal_pages exists in config...OK
Files: layouts/textpage.jade -> dist/
Assemble options: (none)
Options: layout="textpage", partials=[], data="layouts/data.json", assets="assets/built", ext=".html", flatten, production=false, engine="jade", layoutdir="layouts", layoutext=".jade"
Assembling
Steps: 6
validating options
Error loading engine: jade
Error: Cannot find module 'jade'
extension
layouts/textpage.jade
Warning: Cannot read property 'init' of undefined Use --force to continue.

Gruntfile.js


        assemble: {
            options: {
                flatten: true,
                production: false,
                assets: "assets/built",
                engine: "jade",
                layoutdir: "layouts",
                layoutext: ".jade"
            },

            normal_pages: {
                options: {
                    data: "layouts/data.json",
                    layout: "textpage"
                },
                files: {
                    "dist/": [ "layouts/textpage.jade" ]
                }
            }
        },

node v0.10.31 npm v1.4.23 grunt v0.4.5 grunt-cli v0.1.13

welldan97 commented 10 years ago

hmm, cannot reproduce the issue. Do you still have it? can you show your package.json

doertedev commented 10 years ago

Nope switched to middleman/haml. But thanks.

alejandroiglesias commented 9 years ago

@welldan97: i'm having this issue right now. Installed assemble-jade by doing npm install assemble-jade and then ran the build.

Running "assemble:pages" (assemble) task
Error loading engine: jade
Error: Cannot find module 'jade'
Run `npm install assemble-jade` to use jade
Warning: Cannot read property 'init' of undefined Use --force to continue.

Gruntfile extract:

assemble: {
  options: {
    engine: 'jade',
    marked: {
      highlight: function(code, lang) {
        return require('highlight.js').highlightAuto(code,[lang]).value;
      }
    }
  },
  pages: {
    options: {
      flatten: true,
      assets: '<%= config.dist %>/assets',
      layout: '<%= config.src %>/templates/layouts/default.hbs',
      data: '<%= config.src %>/data/*.{json,yml}',
      partials: '<%= config.src %>/templates/partials/*.hbs'
    },
    files: {
      '<%= config.dist %>/': ['<%= config.src %>/templates/pages/*.hbs']
    }
  }
},
alejandroiglesias commented 9 years ago

See #3 for fix.