Open erikwestlund opened 8 years ago
Same here. vueify@8.7.0
Me too. I had problem when trying to compile vue-strap using browserify
@jonnyxe and @korneliuskristianr
if you continue to have issues, I'd suggest moving to elixir 6.0.0.0+ and using webpack.
takes a little work to get going but you'll avoid compile issues and be "on the same page" with jeffrey
If someone can give more information as to what's causing this, please comment so we can fix it.
I am having the same issue. I have been trying to figure out where the issue is coming from. If I set the config
variable in the compiler.js file right before the each statement like this config = {};
I get a different error. The error will be different for other people I imagine, but something is wrong with communicating with browserify.
Saving To...
- public/js/app.js
[18:34:12] gulp-notify: [Laravel Elixir] Browserify Failed!: Unexpected token
/home/vagrant/code/tmp_app/node_modules/vue-strap/src/spinner.scss:10
$brand-primary: darken(#428bca, 6.5%); // #337ab7
I am not quite sure what browserify config object is missing, but I haven't changed anything in my gulpfile. This is my current gulpfile.js (for months). I'm still looking since this has me at a stand still, but thought I'd post if it helped anyone else.
elixir(function(mix) {
mix.less('app.less')
.browserify('app.js', null, null, { paths: 'vendor/laravel/spark/resources/assets/js' })
.copy('node_modules/sweetalert/dist/sweetalert.min.js', 'public/js/sweetalert.min.js')
.copy('node_modules/sweetalert/dist/sweetalert.css', 'public/css/sweetalert.css');
});
For whatever reason, vue-strap
seems to be sending undefined
to vueify. If you look at this line in vueify/index.js
module.exports = function vueify (file, options) {
if (!/.vue$/.test(file)) return through()
console.log(file);
console.log(options);
compiler.applyConfig(options)
I get an undefined variable for options
when the file
is something from the vue-strap module (like Carousel.vue).
Not sure why though
Looks like it this commit is what caused the problem; when they added the options & applyConfig.
https://github.com/vuejs/vueify/commit/af96700d16f3f1630b7972758a874b7743240979
For now ended up with
let
modal = require('vue-strap/dist/vue-strap.min').modal;
// instead of:
// modal = require('vue-strap/src/Modal.vue');
Using version 1.04 (same issue on 1.03), I'm running into this problem. See below. It started out of the blue -- I never had seen the issue before. No files were changed since a successful recompile, but I did switch operating systems from Ubuntu to Mac.
Latest node/npm/gulp installed using homebrew.
Everything compiles down if I exclude my vue components.