Start GD in dev mode,you get
./node_modules/GDJS-for-web-app-only/Runtime/Extensions/Physics2Behavior/JsExtension.js
Error: ENOENT: no such file or directory, open '/home/fox/DEV/GDevelop/newIDE/app/node_modules/GDJS-for-web-app-only/Runtime/Extensions/Physics2Behavior/JsExtension.js'
im on linux btw
Weird thing is that restarting the server fixes it sometimes. The server loads fine, then suddenly I get the import error 30% of the time
Surely because when we import GDJS to GDJS-for-web-app-only directory, we first erase the folder then copy the files. For this, we could exceptionally not erase the folder first.
Do you want to give it a try and let me know if it's better?
Remove this line:
https://github.com/4ian/GDevelop/blob/a315eabdcedb5f04b7bf287272fa46e7b43f924f/newIDE/app/scripts/import-GDJS-Runtime.js#L29
thank you @4ian I will give it a try :)
That doesn't seem to fix it :( I notice that startup speed has degraded too - with npm start now taking several minutes sometimes
Mmm bummer :/
I notice that startup speed has degraded too
I wonder if it's linked to the updated create-react-app version. Maybe because now it's trying to compile node_modules (instead of using them without transpilation by babel). Before I think it was not.
Though actually we were using already react-scripts v2, which was already compiling node_modules it seems..
I have another idea!
Go in the newIDE/app/src/locales and delete all folders excepted for: en folder and LocalesMetadata.js file.
So that you just have:
src/locales
├── LocalesMetadata.js
└── en
├── README.md
└── messages.js
Then re-run npm start.
I think that compilation time will be cut in half at least (on my Macbook Pro, it's now <30s).
The reason is that the language message catalogs are in JavaScript... and huge. Like 500kb for some. It's not making the app larger because they are lazy loaded but this clearly has an impact on the compilation time because they are parsed by babel :/ Ideally there would be a way to tell webpack to ignore them.
Might not solve Error: ENOENT: no such file or directory, open '/home/fox/DEV/GDevelop/newIDE/app/node_modules/GDJS-for-web-app-only/Runtime/Extensions/Physics2Behavior/JsExtension.js', but at least making running the app more bearable?
@4ian I started getting this again and removing this line does seem to make it stop happening
shell.rm('-rf', destinationPath);
Before when I did it, I was still getting it but much less often. Now it seems to immediately stop the issue from occuring.
Thank you for the locales tip. I will delete them to speed up start time, as I never use the other locales myself. I kind of wish it didnt start with them by default in dev mode
Ok, try removing the locales and removing the shell.rm('-rf', destinationPath); and we'll see how it goes.
I think that what we can do is add a parameter to have it done (the rm) only at the start of the app.
Pushed a potential fix like I described on master. The rm operation will be done only when starting the development app. Should hopefully be enough to avoid this rm to avoid stressing too much the filesystem.
try removing the locales
If it's helping, we'll add some command to do it and a mention in the README.
Thank you @4ian :)
Merging the change from dev, now I get an error where my file watcher limit has been reached,so its not even starting.
If I disable this line
if (args.clean) {
shell.echo(`ℹ️ Cleaning destination first...`);
shell.rm('-rf', destinationPath);
}
npm start working again.
Gdevelop appears to chomp up file watchers like no tomorrow :) What is the recommended ammount?Is shell.rm deleting bazillion files? Is there a way to delete them without reaching the limit?
Is shell.rm deleting bazillion files?
Should not be more than a few hundreds.
Were you able to fix that? Maybe we need to migrate to a way to watch the file changes without stressing too much the filesystem - there might be npm modules made for this I think this is not an easy task. See https://github.com/paulmillr/chokidar for example