Skip to content

cjs: fast-json-stringify@7 load fails with 'module is not defined' — blocks #6559 e2e #6586

Description

@proggeramlug

Found while landing #6559 (PR #6584): fast-json-stringify@7 compiles natively (compilePackages) but throws ReferenceError: module is not defined at load — before any runtime-generated code runs.

Some file in its dependency graph reaches a context where the CJS module object isn't provided (candidates: a UMD/dual-format file, a nested typeof module probe compiled as a direct read, or an ESM-classified file that still references module). Needs a bisect of which file in the fjs graph triggers it.

Repro: the #[ignore]d e2e in crates/perry/tests/issue_6559_real_libs_e2e.rs (PERRY_REQUIRE_NPM_E2E=1 … -- --ignored).

Blocks: #6559 real-library acceptance (fjs leg), kimi-code target #6565 (fastify serializes via fjs). Interpreter side already proven against fjs's captured generated code (PR #6584 fixtures).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions