When installing firefox via mach build if the NODE_OPTIONS env variable is set to something in my case `--openssl-legacy-provider` it would break the build and not recognize node binary
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: nikunjgoyal31, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Steps to reproduce:
Try
$ curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O
$ python3 bootstrap.py
for linux. Then set the env variable NODE_OPTIONS=--openssl-legacy-provider
.
Now running ./mach build
will break.
A solution would be unsetting NODE_OPTIONS variable in the script before it is run: https://searchfox.org/mozilla-central/rev/5c922d8b93b43c18bf65539bfc72a30f84989003/build/moz.configure/node.configure#35
Actual results:
Build will break and you will receive this error
ERROR: could not find Node.js executable later than 12.22.12; ensure
nodeor
nodejsis in PATH or set NODEJS in environment to point to an executable.
Expected results:
Build should have successfully completed
Updated•1 year ago
|
Comment 1•1 year ago
|
||
What if someone has good reasons to set NODE_OPTIONS to a value that doesn't break anything?
Comment 2•1 year ago
|
||
Yeah, agreed. I think it'd be better to just fall back to the next node in the path if we can't. The reported had a node 18 which was working, it's just that mach didn't find it because it found the mozbuild one first but that didn't work.
Updated•10 months ago
|
Description
•