Mongosh npm run compile-exec tries to build Node v12.18.4 already installed

I’ve been casually following mongosh
Today’s pull in npm run compile-exec wants to build Node.js v12.18.4
This is weird because I have that version of Node installed and as my default.
Any tips to make the build behave?

The reason we’ve made that switch is because an approach that compiles Node.js from scratch, with custom mongosh-specific parts, allows us to generate binaries that:

  • Use only APIs that are considered officially supported by Node.js
  • Are not tied to a specific Node.js version (e.g. we could start using Node v14.x at any time)
  • Are signable, e.g. we can sign and notarize them for publishing on macOS
  • Eventually support bundling native addons

Do you have a specific use case for compiling binaries locally? We’re mostly focusing on producing executables that match what would be produced in an actual release here.

(Fwiw, you can always also download the release artifacts from CI using e.g. wget https://s3.amazonaws.com/mciuploads/mongosh/<commit>/mongosh-0.4.0-linux.tgz.)

4 Likes

Do you have a specific use case for compiling binaries locally? We’re mostly focusing on producing executables that match what would be produced in an actual release here.

@Anna_Henningsen, I was just doing the open source thing of building on the local machine. I’ll try your suggestion.

Okay, download of the artifact works for me.
And I’ll try the build on a faster machine :slight_smile:
Thanks @Anna_Henningsen

Was able to build on more powerful machine, thanks again @Anna_Henningsen.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.