Skip to content

cjs support broke my project #333

@shuji-koike

Description

@shuji-koike

After upgrading from 2.2.2 to 2.2.3, I started encountering the following TypeScript error.

Error: *******/utils.ts(2,23): error TS7016: Could not find a declaration file for module 'superjson'. '/home/runner/work/*******/node_modules/superjson/dist-cjs/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/superjson` if it exists or add a new declaration (.d.ts) file containing `declare module 'superjson';`

I'm afraid to say that the changes introduced in #301 might have caused this issue.

As a workaround, if I copy superjson/dist-cjs/index.d.ts to superjson/dist-cjs/index.d.cts, the error goes away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions