Skip to content

Native Node Modules for Electron 11 and above do not compile with async cleanup behavior #28043

@implausible

Description

@implausible

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version: 11 and 10
  • Operating System: Windows
  • Last Known Working Electron version: Never, it was a new feature of Node patched into Electron 11/10

Expected Behavior

When compiling a native node module that does not leverage NAPI, if the module attempts to use node::AddEnvironmentCleanupHook, the module will compile.

Actual Behavior

The module does not compile, this is because Windows Electron leverages its own internally compiled version of the standard library, so unique_ptr cannot be leveraged in this way.

To Reproduce

You can use this repository to reproduce:
https://github.com/implausible/electron-abi-issue-demo

Additional Information

Issue can be solved by taking these 2 patches nodejs/node@1fe571a and nodejs/node@bf79987

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions