storyblok / storyblok-vue

Vue.js SDK for Storyblok CMS
MIT License
95 stars 20 forks source link

renderRichtText Missing modules #440

Open desdamo opened 1 year ago

desdamo commented 1 year ago

Describe the issue you're facing

Hello, i tried to use your custom schema method with RichTextSchema. But this module doesnt exist on "@storyblok/vue"

exampe of error : The requested module '/node_modules/.vite/deps/@storyblok_vue.js?v=c4827582' does not provide an export named 'RichTextSchema'

So it's impossible to use a custom schema to insert our custom component in the richTextRender

Can you update the doc or give a solution

Thanks in advance

Reproduction

localhost:6006

Steps to reproduce

example of the code import { RichTextSchema, StoryblokVue } from "@storyblok/vue";

app.use(StoryblokVue, { accessToken: "KEY", apiOptions: { // storyblok-js-client config object cache: {type: "memory"}, }, use: [apiPlugin], richText: { schema: mySchema, resolver: (component, blok) => { switch (component) { case "my-custom-component": return <div class="my-component-class">${blok.text}</div>; default: return "Resolver not defined"; } } } })

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz   
    Memory: 1.96 GB / 15.79 GB
  Binaries:
    Node: 14.21.3 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.18 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 117.0.5938.132
    Edge: Spartan (44.19041.1266.0), Chromium (117.0.2045.47)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

npm

Error logs (Optional)

No response

Validations

alvarosabu commented 1 year ago

localhost:6006

Please provide a valid reproduction link. You can fork https://stackblitz.com/edit/github-mtfdou?file=nuxt.config.ts

ChristPetitjean commented 1 year ago

Did you try to upgrade node ? I personnaly use node v18 and the plugin seems to work