Skip to content

node-gyp-build ignores standardized env variables npm_config_target and npm_config_runtime #78

@IsaacAderogba

Description

@IsaacAderogba

Hey guys, we’ve recently migrated to prebuildify and node-gyp-build to simplify our prebuilds process.

But we’re currently running into an issue where node-gyp-build isn’t acknowledging our environment usage of npm_config_target (for specifying electron version) and npm_config_runtime (for specifying runtime as electron) when installing native modules. This is causing our Electron prebuilds to not be found since it’s instead picking up on our outer node environment.

These environment variables seem to be standardized across Electron, but it looks like node-gyp-build is instead relying on process.versions.module and process.versions.electron to determine these instead. process.versions is marked as readonly so we can’t actually manipulate it to work for use case, so wanted to learn if I was missing something about how node-gyp-build supports environment configuration!

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