-
Notifications
You must be signed in to change notification settings - Fork 921
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
Fix Node.js 18 compatibility, upgrade to create-react-app v5 and make mac build universal #5270
Fix Node.js 18 compatibility, upgrade to create-react-app v5 and make mac build universal #5270
Conversation
@jtsorlinis create this PR to test the CI. |
I hope auto update will work. |
@jtsorlinis Any chance you can try this build (link in my previous posts)? Seems like the CI made something that is not working somehow. |
@4ian Getting the same error with the above DMG. My local one seems to work fine. I just realised I did run one command differently, I installed the latest version of emsdk as the 1.39.6 one didn't seem to even download/install for me. I've added a commit here to my original PR if you want to cherry pick it and see if it fixes the issues. https://github.com/jtsorlinis/GDevelop/commit/7eaeca11e12de19537c6760218882f407ebe79d3 If it does, I can update all the references |
In theory this should not impact the editor in this way, as the result of emsdk is a self contained library (libGD.js) used to manipulate game. It's super important but I don't see why compiling it differently would make this kind of error (worst case, the editor would start and error when loading it - but we would see a window). (btw, did you manager to successfully compile GDevelop.js, i.e: run |
You're correct about the emsdk version not making a difference. I've tried it even without a local emsdk and it seems to work too.
|
It's very strange that the build isn't failing locally as I'm using the same Node version as the pipeline (18). It seems to be failing due to insecure SSL and it seems like an easy fix could be updating the react-scripts version as mentioned here. https://stackoverflow.com/a/71334532 This also upgrades to webpack 5 which means we needed to manually install 'path' as webpack 5 no longer provides the shims by default. The build runs successfully locally, but I have no idea if it will help with CircleCI. I've made a commit on my branch again here: https://github.com/jtsorlinis/GDevelop/commit/3adefbd906ace9cea3ebfc2fcc42665b693eb2a3 |
I've pushed the commit |
Even if it does not solve the issue with CircleCI, it would still be a huge win to get this updated and so the app to work with Node.js 18+, so thank you :) |
Looks like without the linting it worked! Downloaded the dmg from CircleCI and its working fine for me now 👍 |
Just pushed another commit to fix the CI errors |
Great news that it works :) I've not had a chance yet to test it as I was busy. Does the DMG version from CircleCI seems to run well (preview working, adding an image/sound from a file, saving/loading a project)? Still unsure why CircleCI was unable to make a working universal DMG without this though. |
A few more things:
|
If there's anything else I can do to help let me know! |
I've done more changes to fix the unzipping at installation in the various scripts we have on Windows on Node 18, and from testing this seems to work. I'll check again this time on mac and hopefully if nothing broken we should be good! |
I'm sorry I'm delaying this so much, I'm super busy but we'll hopefully release a new version and then we can go ahead with this :) |
dbf94f5
to
cdbe5e3
Compare
Rebased to fix conflicts of packages |
The build seems to work, but the app doesn't work locally on my machine. The path package being used seems to be using a variable "process" that does not exist on web. I've tried using path-browserify instead, but then it needs to be defined as a polyfill for path in the app, and thus we need to define a plugin in the webpack config to do so. (see https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-webpack-5) It means we either need to eject or use react-app-rewired or use something like https://github.com/dilanx/craco to avoid ejecting. |
Fixed by doing this:
And replacing unzipper by adm-zip which works well on Windows. |
Let's see if the builds are working. Local dev seems to work, despite warnings to fix from webpack 5. |
Sorry I haven't been around. I know a while back you mentioned using the path-browserify package instead of path. Would that fix the path issue? |
It seems that it fixed the issue yes :) I believe what remains to do is:
|
I haven't tested windows yet, I can test tomorrow when the build is complete and I have access to one |
d9ae864
to
6a98df4
Compare
The library seems maintained, popular and working well, with a nice to use interface. unzipper was having issue on Node.js 18+ (corrupt files on Windows) Also replace usage of path by path-browserify (as the module does not need to rely on Node.js, it's just to manipulate paths)
395e926
to
38711ee
Compare
libraries that are relying on process, like path-browserify
38711ee
to
b4f553e
Compare
@ClementPasteau Let's give a try to 8GB and maybe other node options to get this to compile on AppVeyor. |
OK it seems that the memory issue on Windows is fixed by increasing the node memory to 8GB. I've tested the generated .exe on Windows, all good. Locally, everything seems to be working on my Mac now. cc @4ian |
Follow-up of #5269 to test the CI