Skip to content

Can not import .node file in esm #40541

Description

@Brooooooklyn

Version

v16.12.0

Platform

x86_64-apple-darwin

Subsystem

No response

What steps will reproduce the bug?

import { fastFunction } from './native.node'

console.log(fastFunction)

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

Always

What is the expected behavior?

[Function: fastFunction]

What do you see instead?

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".node" 

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmIssues and PRs related to the ECMAScript Modules implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions