-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
[Bug Report] Cannot read property 'dark' of undefined in VApp component #6895
Comments
We are not accepting bug reports for alpha builds. |
Having the same issue with the beta, did you ever figure this out? |
@chaim0m I have just figured it out. Although, to be fair, this was already answered by @MajesticPotatoe in the first reply to this issue, where it states that you must properly instantiate Vuetify as explained in the Alpha 5 release notes. I did that and it works. In summary do this: const vuetifyOptions = { }
Vue.use(Vuetify)
new Vue({
el: '#app',
vuetify: new Vuetify(vuetifyOptions)
}) Also, here is a link to a working CodePen https://codepen.io/pbastowski/pen/Rzdqra?editors=1010 |
I'm doing that in my app (with Vuetify 2.0.6) and all is fine, but in my unit tests I use
and I get this error. Not sure how to adjust that for the new Vuetify. |
Never mind, I figured it out -- just had to read the docs. |
@garyo Could you show me what you did and where in the docs it is? I have the same issue and I already do const vuetifyOptions = { }
Vue.use(Vuetify)
new Vue({
el: '#app',
vuetify: new Vuetify(vuetifyOptions)
}) |
Yes -- I followed the test/CustomCard.spec.ts example at https://vuetifyjs.com/en/getting-started/unit-testing.
and
|
This error also occurs if you manually render the component: const Component = Vue.extend(VueComponent)
const instance = new Component({
vuetify, // <-- IMPORTANT
propsData: {
value: true
}
})
instance.$mount() |
When i change like that i'm getting another error [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in ) |
Do you have a repo or a link to the code that you can share? Based on the error message it looks like you are creating text based templates and trying to use a version of Vue without a text-template compiler. However, without seeing the code I can't help you much more than this. |
the error occurs when i changed my vuetify version 1.5.18 to 2.2.28 This is my main.js file
This is my App.vue file
|
Please read the migration guide https://vuetifyjs.com/en/getting-started/releases-and-migrations/#migration-guide. If you need guidance please join us on discord |
Versions and Environment
Vuetify: 2.0.0-alpha.11
Last working version: 1.5.8
Vue: 2.6.6
Browsers: Chrome 73.0.3683.86
OS: Windows 10
Steps to reproduce
Setup a new Vue Project and install Vuetify 2.0.0-alpha.11 with npm.
Expected Behavior
This must start properly
Actual Behavior
The server starts well with
npm run serve
but when I open the page in a browser, I can see this error in console:Reproduction Link
https://github.com/vcastro45/IssueVuetify2
Other comments
My
App.vue
file looks like this:and
main.ts
looks like this:PS
This is due to this line:
vuetify/packages/vuetify/src/components/VApp/VApp.ts
Line 37 in 2c785cc
In fact,
$vuetify.theme
is undefined. just like$vuetify.breakpoints
The text was updated successfully, but these errors were encountered: