vue-form-2
vue-form-2 copied to clipboard
Uncaught TypeError: Vue is not a constructor
I'm getting "Uncaught TypeError: Vue is not a constructor" after running the official cli
$ vue init webpack my-project
...
$ npm install vue-form-2 --save
$ npm run dev
and by adding
import { VueForm, Event } from 'vue-form-2'
to main.js
node version is 7.3.0 npm version is 3.10.10
The failure is happening on bus.js on the line below:
var bus = new Vue();
Suggestions?
Changing bus.js to the new import style "fixes" it, but I'm sure that doing that will cause other problems.
import Vue from 'vue'
var bus = new Vue();
export default bus;
This worked for me, not sure if it's actually any different than above.
import Vue from 'vue/dist/vue.common.js';
I'm having the same issue. Applying the manual edit of @jrutley fixes it for me too, but manually editing files in node_modules does not seem viable.
Fixed in #25 :-)