nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

defineTransformer typecheck error #2459

Closed PhE closed 9 months ago

PhE commented 9 months ago

Environment

Reproduction

Having those import statements in a module ...

import { defineTransformer } from '@nuxt/content/transformers'
// or
import { defineTransformer } from '@nuxt/content/transformers/utils'

... raises errors in nuxt typecheck:

error TS2307: Cannot find module '@nuxt/content/transformers' or its corresponding type declarations.

Describe the bug

The app is working fine in npx bun run dev but raises type error in nuxt typecheck !

Since I also have trouble to get npx bun run generate to work, I want to fix all the type errors before.

Additional context

No response

Logs

Here is the output part of nuxt typecheck showing the errors :

[...]
modules/transformpdf/checkresult.ts:5:35 - error TS2307: Cannot find module '@nuxt/content/transformers' or its corresponding type declarations.

5 import { defineTransformer } from '@nuxt/content/transformers'
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

modules/transformpdf/ignore.ts:4:35 - error TS2307: Cannot find module '@nuxt/content/transformers/utils' or its corresponding type declarations.

4 import { defineTransformer } from '@nuxt/content/transformers/utils'
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PhE commented 9 months ago

Deleting the bun lock file did not solve the issue as it did for nuxt/nuxt#24698

By the way generate is working again, so we will ignore those typecheck errors for now.