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

Cannot read properties of undefined (reading '$modal') #767

Open
encoderuz opened this issue May 14, 2022 · 5 comments
Open

Cannot read properties of undefined (reading '$modal') #767

encoderuz opened this issue May 14, 2022 · 5 comments

Comments

@encoderuz
Copy link

Hi there ! I have inexplicable problem.
project: laravel 8 & vue 3 and installed vue-js-modal

yarn add vue-js-modal // installed through this

Problem:

Cannot read properties of undefined (reading '$modal')

import {createApp, inject, ref} from 'vue' 
import routes from './routes'
import store from "./store/store";    
import VModal from 'vue-js-modal'
const app = createApp(App)
.use(routes)
.use(store)
.use(VModal); 
app.config.globalProperties.$modal = VModal; //and I commented this line 
app.mount('#app');

Version:

Vue 3

Example & screenshots:

image

@Z3rio
Copy link

Z3rio commented Jun 6, 2022

I'm also having this issue

@parrotsoft
Copy link

I have this problem too, with Vue3 and Laravel 9

Screen Shot 2022-08-09 at 10 53 23 AM

@tans27
Copy link

tans27 commented Jan 13, 2023

Anybody fixed this? I have same problem

@Andrevoks
Copy link

try to inject VModal in context nuxt(2).js
export default function (_, inject) { inject("modal", VModal); }
but in context receive this
install: ƒ (e,t)

@dnnzz
Copy link

dnnzz commented Aug 12, 2023

Facing same issue too when in production mode , btw in development mode modal works
Env :
vue-js-modal : 2.0.1
nuxt: 2.15.7

Screenshot_1

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