Skip to content

bug(node:24): import meta main dont work #58660

Closed
@PandaWorker

Description

@PandaWorker

Version

v24.2.0

Platform

Darwin Panda.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

// main.ts
console.log(import.meta.main); // false

// main.js
console.log(import.meta.main); // true

How often does it reproduce? Is there a required condition?

The problem appears when running - .ts files

What is the expected behavior? Why is that the expected behavior?

true
Ts and js files should have the same behavior.

What do you see instead?

false

Additional information

When running, import.meta.main does not work inside ts files

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.strip-typesIssues or PRs related to strip-types support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions