Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when bundling with NodeJS > 16 #1473

Open
Higgs1 opened this issue Aug 11, 2022 · 1 comment
Open

Problem when bundling with NodeJS > 16 #1473

Higgs1 opened this issue Aug 11, 2022 · 1 comment

Comments

@Higgs1
Copy link

Higgs1 commented Aug 11, 2022

Hello,

I'm sorry if this has been mentioned or addressed elsewhere. I'll try to keep this brief.

When trying to compile the game on my system (yarn, yarn, yarn gulp), the browser opened but it was unable to load bundle.js (404). This is because it was never created. I didn't really dig too much into it because I already knew what the problem was. I'm using Node > 16. NodeJS 17 (AFAIK) upgraded to OpenSSL3, which changed the initialization context of md family (compared to the older version of OpenSSL, which NodeJS 16 uses). Setting the environment NODE_OPTIONS=--openssl-legacy-provider switches this back to how it works in Node 16, and now I'm able to successfully compile the game in all the versions of Node I tested (including master).

There are several things that could be done:

  • Take the instructions literally and just use Node 16. "But I wanna use Node x!"
  • Add a note about NODE_OPTIONS=--openssl-legacy-provider in the instructions. (this sounds simplest?)
  • Add NODE_OPTIONS=--openssl-legacy-provider to all builds, since it doesn't affect older versions of Node.
  • Monkey patching the crypto for md4 modules (pls no).
  • Tell me that I've completely missed something because I'm a dummy.

Thank you for your time (and very fun game), HTH.

@EmeraldBlock
Copy link
Collaborator

fear not! this issue has been known for over half a year, and you're doing the right thing. Yes, shapez issue management is kinda all over the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants