Skip to content

node-gyp always pulls headers from internet #1133

@rudicio

Description

@rudicio

After tracing through the code, I noticed that no matter what unless the --tarball flag is explicitly stated node-gyp will always attempt to pull the headers from the internet. The problem with this workaround is that if you try to install an existing npm module built with node-gyp, there is no means to specifying this flag.

It looks like fixing this would be as simple as adding a check if the file already exists in ~/.node-gyp for the architecture, or supporting an environment variable that specifies the path rather than a flag:

https://github.com/nodejs/node-gyp/blob/f6eab1f9e4b160b60b2736bb01a09c83785ba979/lib/install.js

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