strapi icon indicating copy to clipboard operation
strapi copied to clipboard

Export types

Open MarijnFK opened this issue 2 years ago • 4 comments

The types from /dist/runtime/types/ cannot be imported from the package. Can you include them in the types.d.ts?

MarijnFK avatar Feb 02 '24 12:02 MarijnFK

Just encountered the same problem :)

luke-z avatar Feb 05 '24 09:02 luke-z

Same here 👀

marius-mcfly avatar Feb 07 '24 07:02 marius-mcfly

I think the problem comes from the latest version of Nuxt (3.10.1), because I also have the same problem with i18n types.

mrc-bsllt avatar Feb 07 '24 10:02 mrc-bsllt

@danielroe For the time being, the problem is solved by setting this new parameter to false. https://nuxt.com/blog/v3-10#bundler-module-resolution

export default defineNuxtConfig({
  future: {
    typescriptBundlerResolution: false,
  },

 // ...
});

mrc-bsllt avatar Feb 07 '24 11:02 mrc-bsllt

Thanks for the temp fix. Hopefully it gets resolved soon

BayBreezy avatar Apr 01 '24 03:04 BayBreezy

Are you importing the types from #ui/types? https://ui.nuxt.com/getting-started/installation#typescript

benjamincanac avatar Apr 01 '24 17:04 benjamincanac

@benjamincanac , I think you have the repos mixed up?

This is the strapi repo

BayBreezy avatar Apr 01 '24 19:04 BayBreezy

I did indeed get things mixed up, sorry about about that! This should have been fixed by https://github.com/nuxt-modules/strapi/pull/403 already. Will make a release today 😊

benjamincanac avatar Apr 02 '24 09:04 benjamincanac

Thank you ❤️

BayBreezy avatar Apr 02 '24 12:04 BayBreezy

@BayBreezy It's been released! Let me know if the problem persists 😊

benjamincanac avatar Apr 02 '24 12:04 benjamincanac