Next.js Discord

Discord Forum

Jest worker WorkerError when running npm run build on VM

Answered
Horned oak gall posted this in #help-forum
Open in Discord
Horned oak gallOP
I have a java application running on my VM that my nextjs app connects to.

While the java app is running and trying to run "npm run build" on my nextjs app I receive the following error: "Error: Jest worker encountered 1 child process exceptions, exceeding retry limit. type: 'WorkerError'
Answered by Horned oak gall
^ Was missing .env files cuz .gitignore duh #solved
View full answer

4 Replies

Horned oak gallOP
Note: I am able to run npm run build just fine on my local machine with the java app running. Only received the error after cloning the repo to the VM and trying to build there.
Also: If I stop my java server on the VM I am able to run npm run build... but obviously this messes up the builds of the static pages not having access to the backend.
Horned oak gallOP
I did also download the latest nodejsLTS. I was using v20.5.6 and moved to 20.18.1(LTS) and this ran fine... I didn't however update the "dependencies":{} in the package.json so maybe this is the cause of the error? (still though it ran fine locally)... Trying to find a list of what all lines need changed in dependcies when updating nodejs besides the node line itself but not having any luck w/ it yet
Horned oak gallOP
^ Was missing .env files cuz .gitignore duh #solved
Answer