Closed juanfernandes closed 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?
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.
I am using Edition Node Grunt
v2.12.0
onLinux
, with Nodev10.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
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');
/**
PATTERN LAB CONFIGURATION **/
//read all paths from our namespaced config file var config = require('./patternlab-config.json'), pl = require('patternlab-node')(config);
function paths() { return config.paths; }
function getConfiguredCleanOption() { return config.cleanPublic; }
grunt.registerTask('patternlab', 'create design systems with atomic design', function (arg) {
if (arguments.length === 0) { pl.build(function(){}, getConfiguredCleanOption()); }
if (arg && arg === 'version') { pl.version(); }
if (arg && arg === "patternsonly") { pl.patternsonly(function(){},getConfiguredCleanOption()); }
if (arg && arg === "help") { pl.help(); }
if (arg && arg === "liststarterkits") { pl.liststarterkits(); }
if (arg && arg === "loadstarterkit") { pl.loadstarterkit(argv.kit, argv.clean); }
if (arg && (arg !== "version" && arg !== "patternsonly" && arg !== "help" && arg !== "starterkit-list" && arg !== "starterkit-load")) { pl.help(); } });
grunt.initConfig({
/**
/**
COMPOUND TASKS **/
grunt.registerTask('default', ['patternlab', 'sass', 'copy:main']); grunt.registerTask('patternlab:build', ['patternlab', 'sass', 'copy:main']); grunt.registerTask('patternlab:watch', ['patternlab', 'sass', 'copy:main', 'watch:all']); grunt.registerTask('patternlab:serve', ['patternlab', 'sass', 'copy:main', 'browserSync', 'watch:all']); };
Steps to Reproduce
I cd into my sites/design-framework folder and run:
grunt patternlab:serve