storyblok / storyblok-js

JavaScript SDK to connect Storyblok with your favourite framework that we don't have an official SDK for.
http://storyblok.com/
MIT License
39 stars 20 forks source link

Error in SbBlokData definition #66

Closed J-Sek closed 1 year ago

J-Sek commented 2 years ago

I tried to update @storyblok/vue from 6.0.0 to 6.1.0 and the project could not build. Upgrading from TypeScript 4.6.2 to latest 4.7.4 did not affect the output. Unfortunately TypeScript errors are not my thing. I will leave it for you to understand.

node_modules/@storyblok/js/dist/types/types.d.ts:15:5 - error TS2411: Property '_editable' of type 'string | undefined' is not assignable to 'string' index type 'SbBlokKeyDataTypes'.

15     [index: string]: SbBlokKeyDataTypes;
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@storyblok/vue/dist/StoryblokComponent.vue.d.ts:48:27 - error TS2307: Cannot find module './StoryblokComponent.vue.__VLS_template' or its corresponding type declarations.

48     $slots: typeof import('./StoryblokComponent.vue.__VLS_template').default;
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fgiuliani commented 2 years ago

Hey @J-Sek could you try this again and tell us if this is working now for you?

J-Sek commented 2 years ago

Yes, it works. I have the same conclusion. It would be nice if you could merge this so I am not forced to make script to patch this myself before each build on CI/CD.

fgiuliani commented 2 years ago

Hey @J-Sek I'm not following what you want to be merged

tricki commented 2 years ago

Just ran into the same problem. I guess what they want merged is the fix by @breningham which was in a fork. Since there's no PR in this repo yet I've quickly created one: https://github.com/storyblok/storyblok-js/pull/134

fgiuliani commented 2 years ago

Thanks for the clarification @tricki. I just merged your PR

tricki commented 2 years ago

This fixed it for me (version 1.8.2). Can you confirm @J-Sek ?