Build timeout with Gitlab Runner
Hello team,
I have a problem with building a SolidStart application with Gitlab Runner. I hope someone can help 🥹
Problem: it's timeout when using Gitlab Runner (1st photo). The job takes more than 1 hour and is automatically canceled.
Context:
- Last week, it worked but not for now. I think some dependencies are updated and have bugs . I tried to use a fixed version of dependencies as last week & my laptop (2nd photo) but still did not work.
- Try to fix the Dockerfile, use another node version (3rd photo) => did not work
- My laptop (windows) still builds the project successfully with same configuration.
Thank you.
5 Replies
Use
npm ci
instead of install
to ensure that npm respects your package.json file
Presumably, locally some (transitive?) dependencies weren't updated, but when running in gitlab they're all installed fresh
This may not solve your problem, but in any case it's good practice to use npm ci
in CI, and who knows, maybe it won't hang after that
Oh, and make sure to copy over your package-lock file into the docker container first
Not just the package.jsonThanks. I'll try it.
Let us know if it works or not... (I'm going to bed though)
It works! Thank you so much.
Great!