-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:OS: Alpine Edge (with nodejs and npm packages from v3.16) x86_64.
node.js / npm versions: v16/v8
-
Not Needed
-
None
Problem Statement/Rationale
What is going wrong? What action would you like the Engineering team to take?
Cannot follow steps in "Getting started" in CONTRIBUTING.md. It would be nice if "Getting started" section listed all the prerequisites needed to get going. This can probably also affect the onboarding of the new internal contributors.
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
On fresh Alpine Edge system with v3.16 repository added (should probably also work on fresh Alpine v3.16 system; on other distributions the results will probably be slightly different): install nodejs and npm packages from v3.16 repository (since https://github.com/mongodb-js/compass/blob/main/CONTRIBUTING.md says that you'll need older node v16 and npm v8, and this is the latest Alpine version that has these); install git.
Then clone compass repository, and, as CONTRIBUTING.md instructs: navigate to the repository and run `npm run bootstrap`.
Expected Results
What do you expect to happen?
`npm run bootstrap` finishes successfully.
Actual Results
What do you observe is happening?
Some errors are produced; fixing them results in more errors; some of them require effort to figure out how to fix them. Not all errors seem to be fixable.
Additional Notes
Any additional information that may be useful to include.
It seems that at least `python3`, `gcc`, `g++`, `make` and `krb5-dev` are required for `npm install` in the root monorepo directory (first part of what `npm run bootstrap` does) to finish successfully. This list is incomplete, because I didn't even manage to get `npm install` to finish successfully.
Some specific examples:
- While CONTRIBUTING.md says "You'll need node ^16 and npm ^8 installed on your machine to work with the repository locally", actual requirements in `package.json` are `"node": ">=16.15.1"` and `"npm": ">=8.19.4"`. So while e.g. node v18 and npm v10 satisfy these requirements, npm v8.10 (from Alpine v3.16 repository) does satisfy them. This can be solved easily enough;
- `compass-shell` subpackage depends on `node-runtime-worker` which depends on `interruptor` (by MongoDB) which, according to its readme (https://github.com/mongodb-js/interruptor) does not provide any pre-built binaries, so one has to manually figure out what dependencies does it need to be built; there are several more examples like that, but all seem to eventually be solved by installing `python3`, `make`, `gcc` and `g++`;
- Several subpackages including `compass` depend on `kerberos` (by MongoDB), which, according to its readme (https://www.npmjs.com/package/kerberos), requires "Distribution-specific kerberos packages". This is solved by installing `krb5-dev` package, but some effort was required to figure that out when the only thing I had was the error message saying that `gssapi/gssapi.h` is not found;
- Several subpackages, including `compass`, depend on `mongodb-client-encryption`, which I wasn't able to get to install on my system at all (related issue:
MONGOCRYPT-600); - There are probably more issues, but I didn't go further after getting stuck at `npm run bootstrap` (or `npm install`) failing with
MONGOCRYPT-600.
None of these issues are very significant, but they block outside contributors from following CONTRIBUTING.md, and might also make developer experience worse for new internal contributors (unless this is already resolved in some internal onboarding document).
Unfortunately, because the list of issues above is non-exhaustive (because I wasn't able to get even `npm install` to finish successfully), I cannot submit any patch to CONTRIBUTING.md.