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

renderRichtText Missing modules #440

Open
1 task done
desdamo opened this issue Oct 3, 2023 · 2 comments
Open
1 task done

renderRichtText Missing modules #440

desdamo opened this issue Oct 3, 2023 · 2 comments
Labels
pending-author [Issue] Add Storyblok employee pending-triage [Issue] Add labels to describe it or prioritize it

Comments

@desdamo
Copy link

desdamo commented Oct 3, 2023

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

@desdamo desdamo added pending-author [Issue] Add Storyblok employee pending-triage [Issue] Add labels to describe it or prioritize it labels Oct 3, 2023
@alvarosabu
Copy link
Contributor

alvarosabu commented Oct 6, 2023

localhost:6006

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

@ChristPetitjean
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-author [Issue] Add Storyblok employee pending-triage [Issue] Add labels to describe it or prioritize it
Projects
None yet
Development

No branches or pull requests

3 participants