Open DallasHoff opened 5 months ago
It actually looks like a upstream issue, thanks for reporting! I will see if we can do anything from our side or if we need to wait on a fix in mkdist. Is this blocking something you try to achieve currently and is a workaround needed or is this just blocking you from getting correct declarations?
Is this blocking something you try to achieve currently and is a workaround needed or is this just blocking you from getting correct declarations?
Just correct declarations. I can put a @ts-expect-error
above the import line for now.
@DallasHoff this was fixed upstream by nuxt module tooling updates. Can you verify if the error is gone for you with the latest version?
When attempting to import something in an app from one of the mjs files, e.g.,
...TypeScript is unable to resolve the declaration file and errors on that line.
The declaration file next to
session.mjs
is namedsession.d.ts
. Renaming this file tosession.d.mts
fixes the error and brings in the types correctly. Nuxt Module Builder is outputting the declaration files with the wrong extension.This issue might be related.