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

'Vue is not defined' #426

Closed
jaketyb opened this issue Sep 14, 2021 · 7 comments
Closed

'Vue is not defined' #426

jaketyb opened this issue Sep 14, 2021 · 7 comments
Labels
wontfix This will not be worked on

Comments

@jaketyb
Copy link

jaketyb commented Sep 14, 2021

Attempting to use gridjs-vue produces the error 'Vue is not defined' in the browser console, and the app is prevented from rendering.

Following either the local or global component registration guide produces the same error.

My main.js before adding any gridjs-vue references, working fine:

import Vue from 'vue'
import App from './App.vue'
import store from './store/store.js'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import 'select2/dist/css/select2.min.css'

Vue.config.productionTip = false
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)

new Vue({
  render: h => h(App),
  store,
}).$mount('#app')

After registering:

import Vue from 'vue'
import App from './App.vue'
import store from './store/store.js'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
import { GridGlobal } from 'gridjs-vue';

import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import 'select2/dist/css/select2.min.css'

Vue.config.productionTip = false
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
Vue.use(GridGlobal)

new Vue({
  render: h => h(App),
  store,
}).$mount('#app')

Then the app no longers renders and the following error is seen in the browser console:

main.esm.js?a234:1 Uncaught ReferenceError: Vue is not defined
    at Module.eval (main.esm.js?a234:1)
    at eval (main.esm.js:8)
    at Module../node_modules/gridjs-vue/dist/main.esm.js (chunk-vendors.js:5346)
    at __webpack_require__ (app.js:786)
    at fn (app.js:151)
    at eval (main.js:14)
    at Module../src/main.js (app.js:1292)
    at __webpack_require__ (app.js:786)
    at fn (app.js:151)
    at Object.

If I just follow the local component registration and do something like this:

<template>  
    <div>
        <Grid :cols="[]" :rows="[]"></Grid>
    </div>
</template>

<script>
import  { Grid } from 'gridjs-vue'

export default {    
    components: {
        Grid    
    }
}
</script>

I still get the same 'Vue is not defined' error. I fail to see anything I'm doing wrong, other parts of my app work fine without throwing any errors.

I'm using Vue 2.6.14.

@jaketyb
Copy link
Author

jaketyb commented Sep 14, 2021

Downgrading to v4.0.0 has fixed this for now

@PurpleEyeGH
Copy link

Ok same here

@stale
Copy link

stale bot commented Oct 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 16, 2021
@stale stale bot closed this as completed Oct 24, 2021
@cjonstrup
Copy link

Same issue

@Dev314
Copy link

Dev314 commented Nov 29, 2021

The same issue for me :-(

@palanza
Copy link

palanza commented Apr 28, 2022

+1

@ZerxaFun
Copy link

+1..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants