Skip to content

Metascraper should work with turbopack and next.js 15 #768

@aldenquimby

Description

@aldenquimby

Steps

  • Create a new next.js app (getting started guide)
  • Add an API route or server action that uses metascraper and call it

Expected

  • metascraper is usable with next.js 15, which uses turbopack to build

Actual

  • whenever the API route or server action is hit, next.js crashes with this error
⨯ Error: Cannot find module 'es5-ext/array/#/e-index-of'

Notes

  • es5-ext uses # as a folder name, and that appears to break turbopack
  • es5-ext is coming from this dependency tree
  └─┬ @metascraper/[email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └─┬ [email protected]
          ├─┬ [email protected]
          │ └── [email protected] deduped
          ├─┬ [email protected]
          │ ├─┬ [email protected]
          │ │ └── [email protected] deduped
          │ └─┬ [email protected]
          │   └── [email protected] deduped
          ├─┬ [email protected]
          │ └── [email protected] deduped
          ├─┬ [email protected]
          │ └── [email protected] deduped
          ├─┬ [email protected]
          │ └── [email protected] deduped
          └─┬ [email protected]
            └── [email protected] deduped

Minimal next.js repro

import createMetascraper from 'metascraper';

export function GET() {
  console.log(createMetascraper);
  return new Response(JSON.stringify({ here: 'test' }), { status: 200 });
}

Proposal

  • could we change debug-logfmt to stop using debug-fabulous?
    • it looks like the meat of the library is one file and that could be re-implemented without using memoizee
  • please let me know if you'd prefer I log the bug under debug-logfmt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions