Skip to content

@blocksuite/global published with TypeScript sources but imports .js files that do not exist #9107

@ededuardomoreno

Description

@ededuardomoreno

Hi Blocksuite team,

I'm unable to use @blocksuite/global (and by extension, @blocksuite/store) in my Next.js project due to a packaging error. The published npm package contains only TypeScript source files in the src/ directory, but internal imports expect compiled .js files.

Error:

Module not found: Can't resolve './consts.js' in @blocksuite/global/src/di/index.ts
> 1 | export * from './consts.js';
    | ^

Steps to reproduce:

  • Install @blocksuite/global (and @blocksuite/store) via npm or pnpm.
  • Attempt to import from @blocksuite/global in a Next.js/Node.js/React project.
  • Observe build failure due to missing .js files.

What’s happening:

  • The npm package only contains TypeScript files in src/
  • Internal imports reference .js files (e.g., ./consts.js) that do not exist
  • There is no compiled output directory (dist/ or lib/)

Expected behavior:

The package should ship compiled JavaScript files and reference those in all imports/exports.

Environment:

  • @blocksuite/global version: 0.21.0
  • @blocksuite/store version: 0.21.0
  • Next.js version: 15.2.4
  • Node: v22.14.0
  • Package manager: pnpm

Additional info:

  • This affects all consumers, not just Next.js.
  • Workarounds like transpilePackages or aliasing do not resolve the missing file error.

Please publish a fixed version with compiled JS output and correct internal imports. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions