This repository was archived by the owner on Dec 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Error when using vueify transformation in gulp #138
Comments
module.exports = function() {
var gulp = require('gulp')
var utils = require('./utils')
var browserify = require('gulp-browserify')
var vueify = require('vueify')
var babelify = require('babelify')
gulp.task('browserify', function() {
gulp.src([
'./client/js/backend/main.js'
], {base: './client/js'})
.pipe(browserify({
transform: [babelify, vueify],
debug: !utils.isProduction()
}))
.pipe(gulp.dest('./public/js'))
})
}
[23:39:11] Using gulpfile ~/php-works/laravel-starter/gulpfile.js
[23:39:11] Starting 'browserify'...
[23:39:11] Finished 'browserify' after 14 ms
/home/nay/php-works/laravel-starter/node_modules/vueify/index.js:11
sourceMap: options._flags.debug
^
TypeError: Cannot read property 'debug' of undefined
at vueify (/home/nay/php-works/laravel-starter/node_modules/vueify/index.js:11:30)
at /home/nay/php-works/laravel-starter/node_modules/browserify/index.js:423:43
at makeTransform (/home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:209:21)
at /home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:186:9
at Deps.getTransforms (/home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:191:7)
at Deps.readFile (/home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:164:25)
at /home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:280:14
at onresolve (/home/nay/php-works/laravel-starter/node_modules/module-deps/index.js:150:14)
at result (/home/nay/php-works/laravel-starter/node_modules/browserify/index.js:715:13)
at /home/nay/php-works/laravel-starter/node_modules/browserify/index.js:761:9 |
Same here. Workaround without changing the
but preferably getting this fixed. Thanks! |
+3 for me.
Halp! |
@robbash Worked for me as well, thanks. I'll be +4. |
thomas07vt
added a commit
to thomas07vt/vueify
that referenced
this issue
Feb 23, 2017
options._flags is not always set when using browserify transformations - version affected: "vueify": "^9.4.0" Example of failure in gulp file ```javascript // package.json gulp.task('all', function() { process.env.NODE_ENV = 'production'; return browserify('./source/js/all.js') .transform(babelify.configure({ presets: ["es2015"]})) .transform(vueify) .bundle() .pipe(source('./js/all.js')) .pipe(buffer()) .pipe(rev()) .pipe(gulp.dest(pub)) .pipe(rev.manifest('./build/rev-manifest.json', { base: '', merge: true })) .pipe(gulp.dest('.')); }); ``` ```bash $ gulp all [19:15:56] Using gulpfile ~/gulpfile.js [19:15:56] Starting 'all'... code/node_modules/vueify/index.js:12 sourceMap: options._flags.debug ^ TypeError: Cannot read property 'debug' of undefined at vueify (code/node_modules/vueify/index.js:12:30) ```
+1 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When trying to run vueify as a transformation using gulp-browserify or running a command via gulp-shell I get the error:
I get the same error when I try to run the browserify command via gulp-shell
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:
The text was updated successfully, but these errors were encountered: