Need Help deploy Strappi project

acadillon
HOBBY

3 months ago

Project ID : 0fbacd1a-9f9a-4ddf-9840-88bd35f46096

Whenever I try to redeploy my Strapi project, it fails, and I get the same log. My local Node version is v20.19.0. I tried adding "engines": {"node": "20.x"} to my package.json, removing package-lock.json, reinstalling all packages, and adding a NODE_VERSION = 20 variable in my Railway project, but I always get an error during deployment. I don’t know what to do. Last time the build went fine was on February 28, 2025. Do you have any idea how to resolve this issue?

[stage-0 6/10] RUN --mount=type=cache,id=s/f4306ee5-c554-413d-b5f5-0a16da75e9f9-/root/npm,target=/root/.npm yarn install
"yarn install" did not complete successfully: exit code: 1
yarn install v1.22.22
info No lockfile found.
$ nvm use 20 || true
/bin/sh: 1: nvm: not found
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json…
error strapi@0.1.0: The engine "node" is incompatible with this module. Expected version "20.x". Got "22.11.0"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Found incompatible module.

Solved

0 Replies

3 months ago

try removing the bogus preinstall script


acadillon
HOBBY

3 months ago

I removed "preinstall" from my package.json scripts, yet it didn’t work.
I also tried to neutralize it by replacing it with "preinstall": "echo 'Skipping preinstall…'". I now have this log:
I have removed and reinstalled Node a few times already and don’t know what to do next. 🧐

yarn install v1.22.22
info No lockfile found.
$ echo 'Skipping preinstall…'
Skipping preinstall…
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] Validating package.json…
error strapi@0.1.0: The engine "node" is incompatible with this module. Expected version "20.x". Got "22.11.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


3 months ago

try setting your engines.node to 20 in your package.json


acadillon
HOBBY

3 months ago

I already have :
"engines": {
"node": "20.x",
"npm": ">=6"
},
I tried "20" and "20.x" Still not deploying. 🫤


3 months ago

can you try switching to Railpack in the service settings?


acadillon
HOBBY

3 months ago

Thank you Brody ! It's working 🎉🎉🎉


3 months ago

awesome!


3 months ago

!s


Status changed to Solved brody 3 months ago