Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issues #22

Open
erikwestlund opened this issue Jul 10, 2016 · 8 comments
Open

Compile issues #22

erikwestlund opened this issue Jul 10, 2016 · 8 comments

Comments

@erikwestlund
Copy link

erikwestlund commented Jul 10, 2016

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.

Mac-Pro:xxxxxx erik$ gulp
(node:26009) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
[00:09:23] Using gulpfile ~/code/xxxxxxx/gulpfile.js
[00:09:23] Starting 'default'...
[00:09:23] Starting 'browserify'...

Fetching Browserify Source Files...
   - resources/assets/js/admin.js


Saving To...
   - public/assets/js/admin.js

[00:09:23] Finished 'default' after 395 ms
/Users/erik/code/xxxxxxx/node_modules/vueify/lib/compiler.js:59
  Object.keys(config).forEach(function (key) {
         ^

TypeError: Cannot convert undefined or null to object
    at EventEmitter.compiler.applyConfig (/Users/erik/code/xxxxxxx/node_modules/vueify/lib/compiler.js:59:10)
    at vueify (/Users/erik/code/xxxxxxx/node_modules/vueify/index.js:8:12)
    at nr (/Users/erik/code/xxxxxxx/node_modules/module-deps/index.js:289:23)
    at /Users/erik/code/xxxxxxx/node_modules/resolve/lib/async.js:44:21
    at ondir (/Users/erik/code/xxxxxxx/node_modules/resolve/lib/async.js:187:31)
    at /Users/erik/code/xxxxxxx/node_modules/resolve/lib/async.js:153:39
    at onex (/Users/erik/code/xxxxxxx/node_modules/resolve/lib/async.js:93:22)
    at /Users/erik/code/xxxxxxx/node_modules/resolve/lib/async.js:24:18
    at FSReqWrap.oncomplete (fs.js:117:15)
@jimping
Copy link

jimping commented Jul 21, 2016

Same here.
[email protected]

@kriskornel
Copy link

kriskornel commented Jul 21, 2016

Me too.
I had problem when trying to compile vue-strap using browserify

@erikwestlund
Copy link
Author

@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

@JeffreyWay
Copy link
Owner

If someone can give more information as to what's causing this, please comment so we can fix it.

@nbyloff
Copy link

nbyloff commented Jul 27, 2016

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');
});

@nbyloff
Copy link

nbyloff commented Jul 27, 2016

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

@nbyloff
Copy link

nbyloff commented Jul 27, 2016

Looks like it this commit is what caused the problem; when they added the options & applyConfig.

vuejs/vueify@af96700

@antongorodezkiy
Copy link

For now ended up with

let
  modal = require('vue-strap/dist/vue-strap.min').modal;
  // instead of:
  // modal = require('vue-strap/src/Modal.vue');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants