Nuxt module type errors leak into app typecheck

I have an internal nuxt module @agorastore/shared-ui, which is consumed by a nuxt app.
Locally, on the module code, I don't have any type errors, everything is properly typed & works fine.

But when I build & release the module, the build output has some type issues I don't have on the module code. These type issues aren't a big deal, they don't cause harm & the module works as excepted.

Except for one thing : when I run nuxi typecheck on my app, these errors leak into the app type errors :

Found 18 errors in 6 files.

Errors  Files
     3  app/entities/items/schema.tsx:107
     5  node_modules/@agorastore/shared-ui/dist/runtime/components/layout/FloatingSidebar.vue:82
     6  node_modules/@agorastore/shared-ui/dist/runtime/components/layout/SidebarNavigation.vue:41
     1  node_modules/@agorastore/shared-ui/dist/runtime/lib/form/components/field/ArrayTabField.vue:137
     2  node_modules/@agorastore/shared-ui/dist/runtime/lib/form/components/field/CheckboxGroupField.vue:55
     1  node_modules/@agorastore/shared-ui/dist/runtime/lib/form/components/field/TextField.vue:40


The only valid app-level error here is the first one, all the others shouldn't be visible on my app when type-checking.

I've tried various things, such as flagging the package in 'exclude' in tsconfig, enabling skipLibCheck, but no matter what I try, I can't figure out how to exclude these errors from the app-level type errors. This prevents me from enabling typecheck in CI for example, which is quite a big deal
Was this page helpful?