Open hlovdal opened 1 year ago
Awesome! That's been a major pain point for me as well lately. I don't remember exactly what the context was, but the next time I face this error, I'll keep this issue in mind!
Yeah, this happens with Node 18 and 20 btw, but not with Node 16.
TL;DR
If you get error
Error in bail mode: Error: callback(): The callback was already called
when runningnpm run build
then you need to set theNODE_OPTIONS
environment variable to include--openssl-legacy-provider
.Details
I created a test project by running
node .../src/github/userscripter/bin/cli.js init
followed by runningnpm install
andnpm run build
, and the build command failed withAfter making some debug modifications to
node_modules/loader-runner/lib/LoaderRunner.js
I noticed the following in the debug outputwhich matched the part about "digital envelope routines::unsupported" from this comment, and when I ran
then the build succeeded.