pattern-lab / edition-node-grunt

The grunt wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
MIT License
38 stars 21 forks source link

Cannot run grunt patternlab:* #33

Closed juanfernandes closed 6 years ago

juanfernandes commented 6 years ago

I am using Edition Node Grunt v2.12.0 on Linux, with Node v10.6.0.

Expected Behavior

Running grunt patternlab:serve runs pattern lab

Actual Behavior

Error ====[ Pattern Lab / Node - v2.12.0 ]====

Loading "Gruntfile.js" tasks...ERROR

TypeError: Cannot read property 'options' of undefined at pluginInit (/home/juanfernandes/sites/design-framework/node_modules/plugin-node-tab/index.js:64:66) at initializePlugins (/home/juanfernandes/sites/design-framework/node_modules/patternlab-node/core/lib/patternlab.js:135:7) at patternlab_engine (/home/juanfernandes/sites/design-framework/node_modules/patternlab-node/core/lib/patternlab.js:183:3) at Object.module.exports (/home/juanfernandes/sites/design-framework/Gruntfile.js:24:36) at loadTask (/home/juanfernandes/sites/design-framework/node_modules/grunt/lib/grunt/task.js:315:10) at Task.task.init (/home/juanfernandes/sites/design-framework/node_modules/grunt/lib/grunt/task.js:434:5) at Object.grunt.tasks (/home/juanfernandes/sites/design-framework/node_modules/grunt/lib/grunt.js:111:8) at Object.module.exports [as cli] (/home/juanfernandes/sites/design-framework/node_modules/grunt/lib/grunt/cli.js:27:9) at Object. (/usr/local/lib/node_modules/grunt-cli/bin/grunt:44:20) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:236:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:560:3)

Running tasks: patternlab:serve Warning: Task "patternlab:serve" not found. Use --force to continue.

My gruntfile:

/**

module.exports = function (grunt) {

var path = require('path'), argv = require('minimist')(process.argv.slice(2));

// load all grunt tasks grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-browser-sync'); grunt.loadNpmTasks('grunt-contrib-sass');

/**

Steps to Reproduce

I cd into my sites/design-framework folder and run: grunt patternlab:serve

juanfernandes commented 6 years ago

I've tried another instance of Pattern Lab, running the same PL version and that works, so the issue is not with PL, but maybe a plug in?

juanfernandes commented 6 years ago

The issue was being caused by plugin-node-tab- I had created a new branch to test adding this plugin, but couldnt get it to work, so deleted the branch, but for some reason the plugin was still in node_modules, but because there was no options for it in config, it was causing an error.