setec
setec

Reputation: 16090

Getting node-gyp dependent modules on windows without building

There are many important node-gyp-dependent NodeJS modules, but to install them on windows requires a certain amount of software to be preinstalled (python, visual studio). It's crude and time-consuming solution:

  1. Just to get proper Python + VS version for specific windows version is a challenge worthy of Sherlock Holmes skills
  2. Installing whole IDE and Python and never use it, just to get module locally once? Crazy.
  3. Distributing such nodejs apps may require consumer to have all that gyp-related bloatware to be installed, and that means loosing 99% consumers.

So what are possibilities of reducing this issue to zero?

Are there some services which provide pre-built to certain platform modules?

And why developers of those modules can't just distribute already built modules for major windows versions?

Upvotes: 2

Views: 166

Answers (1)

justin.m.chase
justin.m.chase

Reputation: 13665

There is a project addressing this issue called node-pre-gyp. This does require the package developer to opt-in to using node-pre-gyp as well as figuring out how to host the binaries themselves somehow. But when it works it's pretty nice.

I have a similar project electron-updater-tools which supports electron compatible pre-built binaries.

There has been talk about node foundation adding some better support for this inherently (e.g. cross platform CI servers and binary hosting facilities) but the conversation is on-going.

Upvotes: 1

Related Questions