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.prototype.$vuetify is undefined in src/i18n/index.ts #5

Closed
jmeinke opened this issue Apr 7, 2019 · 3 comments
Closed

Vue.prototype.$vuetify is undefined in src/i18n/index.ts #5

jmeinke opened this issue Apr 7, 2019 · 3 comments

Comments

@jmeinke
Copy link
Contributor

jmeinke commented Apr 7, 2019

Hey @iliyaZelenko, after trying your fix for #1. I've encountered the next error:

For me Vue.prototype.$vuetify is undefined although I am using vuetify in my project.
It's being used in the getCurrentLang method in src/i18n/index.ts.

Maybe I'm doing something wrong?

I've attempted a fix (see my pull request #6). However, afterwards there are even more problems:

[Vue warn]: $attrs is readonly.
found in
---> <Main> (This is tiptap-vuetify - I would also suggest to rename main to something more meainingful)
       <RichTextField> (This is my component)

and

[Vue warn]: $listeners is readonly.
found in
---> <Main>
       <RichTextField>

and

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"

found in

---> <Main>
       <RichTextField>

and

[Vue warn]: Unknown custom element: <v-tooltip> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Menu>
       <Main>
         <RichTextField>

and

[Vue warn]: Unknown custom element: <v-btn> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> <Menu>
       <Main>
         <RichTextField>

and so on for all used vuetify elements (v-icon, v-card, v-toolbar).

It's all warnings, but actually the editor does not work for me and the vuetify elements are not shown.
It looks like the following:
Broken-Component

Thanks for your help :)

@jmeinke
Copy link
Contributor Author

jmeinke commented Apr 7, 2019

Here is maybe some help for reproduction:
I have created a project using the vue create testproject and configuring it like the following:

Vue CLI v3.5.5
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, TS, Router, Linter, Unit
? Use class-style component syntax? Yes
? Use Babel alongside TypeScript for auto-detected polyfills? Yes
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a linter / formatter config: Standard
? Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection)Lint on save
? Pick a unit testing solution: Jest
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files

Then switch to the directory cd testproject and configure vue add vuetify like the following:

? Choose a preset: Configure (advanced)
? Use a pre-made template? (will replace App.vue and HelloWorld.vue) Yes
? Use custom theme? No
? Use custom properties (CSS variables)? No
? Select icon font Font Awesome 5
? Use fonts as a dependency (for Electron or offline)? No
? Use a-la-carte components? Yes
? Select locale German

@iliyaZelenko
Copy link
Owner

The errors look rather strange and seem to have nothing to do with my code. I will work on it. I tried without vue cli and worked with your code. But I will definitely try to create project with vue cli.

I think in the near future will fix it.

@iliyaZelenko
Copy link
Owner

I have released a new version, I hope this error no longer exists.

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

2 participants