Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Error when using vueify transformation in gulp #138

Open
@yugen

Description

@yugen

When trying to run vueify as a transformation using gulp-browserify or running a command via gulp-shell I get the error:

17:28:42] Finished 'vueify' after 9.03 ms
/Users/jward3/tutorials/cordova/surveys/node_modules/vueify/index.js:11
    sourceMap: options._flags.debug
                             ^

TypeError: Cannot read property 'debug' of undefined
    at vueify (/Users/jward3/tutorials/cordova/surveys/node_modules/vueify/index.js:12:30)
    at /Users/jward3/tutorials/cordova/surveys/node_modules/browserify/index.js:423:43
    at makeTransform (/Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:209:21)
    at /Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:186:9
    at Deps.getTransforms (/Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:191:7)
    at Deps.readFile (/Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:164:25)
    at /Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:280:14
    at onresolve (/Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:150:14)
    at /Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:145:17
    at /Users/jward3/tutorials/cordova/surveys/node_modules/module-deps/index.js:426:39

I get the same error when I try to run the browserify command via gulp-shell

browserify -t vueify -e www/js/index.js -o www/build/main.js --debug=true

The command works when run directly on the command line.

I'm a noob to node, gulp, and vue/vueify so it's possible (likely?) that I've made some kind of mistake here.

Here's the relevant portion of my gulpfile in case that is useful:

var gulp = require('gulp'),
    browserify = require('gulp-browserify'),
    shell = require('gulp-shell');

gulp.task('js', function(){
    // attempt to bypass gulp-browserify
    // gulp.src('./www/js/index.js')
    //     .pipe(shell([
    //         'browserify -t vueify -e www/js/index.js -o www/build/main.js --debug=true'
    //     ]));

    gulp.src('components/**/*.vue',{ read: false })
        .pipe(browserify({
            debug: true,
            transform: [ 'vueify'],
        }))
        .pipe(gulp.dest('./dist/components'));
});
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions