https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/168156/steps/install-port/logs/stdio
/opt/local/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS
Command failed: NODE_OPTIONS=--openssl-legacy-provider /opt/local/bin/npm --verbose ci && NODE_OPTIONS=--openssl-legacy-provider /opt/local/bin/npm --verbose run build
Exit code: 9
Okay to tackle this I need to extract the version of openssl linked by nodejs. If it’s 3.x, I use that option; if it’s 1.x, don’t use that option.
node -e "console.log(process.versions)" | grep openssl | grep -e "\d.\d*.\d*" -o
can do this. Is there a better/more elegant way?