Skip to content

SEA-ESM: Warning Babel parse has failed: import.meta may appear only with 'sourceType: "module" #264

@viceice

Description

@viceice

What version of pkg are you using?

6.18.0

What version of Node.js are you using?

v24.14.1

What operating system are you using?

Ubuntu 24.04.4 LTS (WSL)

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

node24-linux-x64,node24-linux-arm64

Describe the Bug

creating a esm js file which uses import.meta and a package.json with type=module create the warning

Warning Babel parse has failed: import.meta may appear only with 'sourceType: "module"' (5:62) in ~/containerbase/containerbase-base/dist/app/containerbase-cli.js

Expected Behavior

No compile warning when compiling.

To Reproduce

  1. checkout containerbase/base@f57f750
  2. run pnpm i
  3. run pnpm build (generated files are in dist folder)
  4. see warning

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