m4rvr / storyblok-rich-text-renderer

Fast renderer for your rich-text content.
35 stars 15 forks source link

Help needed with V2 :( #25

Closed muhammedjenos closed 1 year ago

muhammedjenos commented 2 years ago

I have had the v2 version implemented for a while now in a Nuxt 2 project and everything was working fine until couple of days ego. Now the rich text renderer give warnings like:

[Vue warn]: The setup binding property "linkType" is already declared.

found in

<SbLink>
       <SbParagraph>
         <SbDocument>
          ...
             ...

not just linkType but all other tags as well. Refreshing the page a server error warning with the console now showing

TypeError: Cannot add property _Ctor, object is not extensible 
    at t.extend (3fc59dc.js:2:42246)

I have deleted and reinstalled node packages, tried different version of composition-api etc..etc..and now run out of options.

Could some expert here point me to the right direction what could be the issue?

muhammedjenos commented 2 years ago

Solved. Vue version 2.7 mess up with the composition api plugin. Keep Vue at 2.6.14 and below and the plugin worked as expected

deodat commented 1 year ago

Hello @muhammedjenos, Il have the exact same problem. How did you keep Vue at 2.6.14 or below? Is it with an override in your package.json file like this:

  "overrides": {
    "vue": "2.6.14",
  }

?

Thanks :)

muhammedjenos commented 1 year ago

Hi @deodat, I uninstalled vue and re-installed 2.6.14 and locked the version. In package.json: "vue": "2.6.14"

deodat commented 1 year ago

Thanks @muhammedjenos, that's what I did and it worked :)

kubyshkin1994 commented 1 year ago

For "nuxt": "^2.15.8"

  1. Uninstall Vue packages yarn remove vue vue-server-renderer vue-template-compiler or npm uninstall vue vue-server-renderer vue-template-compiler

  2. Re-install Vue packages version 2.6.14 yarn add vue@2.6.14 vue-server-renderer@2.6.14 vue-template-compiler@2.6.14 or npm install vue@2.6.14 vue-server-renderer@2.6.14 vue-template-compiler@2.6.14

  3. In package.json lock versions

If you use yarn, use resolutions

"resolutions": {
  "vue": "2.6.14",
  "vue-server-renderer": "2.6.14",
  "vue-template-compiler": "2.6.14"
}

If you use npm, use overrides

"overrides": {
  "vue": "2.6.14",
  "vue-server-renderer": "2.6.14",
  "vue-template-compiler": "2.6.14"
}
  1. Then delete your package manager's lock file rm -f yarn.lock

  2. And reinstall it yarn install or npm install

katerlouis commented 1 year ago

@muhammedjenos dumb question: how do you install v2 of this plugin? $ npm install @marvr/storyblok-rich-text-vue-renderer@2.0.1 doesn't seem to do the trick?