7 months ago
Good morning,
I'm having trouble building my project, and I'm getting the following error:
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning bare-fs@4.1.3: The engine "bare" appears to be invalid.
warning bare-os@3.6.1: The engine "bare" appears to be invalid.
error lint-staged@16.0.0: The engine "node" is incompatible with this module. Expected version ">=20.18". Got "20.11.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
I'm using the "RAILPACK" builder, and I've already tried adding the variable RAILPACK_NODE_VERSION="20.18" but the error above still persists...
Does anyone have any idea how to fix this?
Thanks
14 Replies
7 months ago
I also tried setting RAILPACK_NODE_VERSION="22", but the error didn’t change... =/
7 months ago
Do you have a node version specified in your package.json?
Something somewhere is overwriting your node version because the default is node 22 on Railpack
7 months ago
My package.json doesn't specify any Node.js version.
7 months ago
And you're 100% sure you're using Railpack, you don't have a Dockerfile or anything?
7 months ago
I'm definitely using Railpack, and there's no Dockerfile in the project.
Attachments
7 months ago
Railpack defaults to Node v22.
Can you send a link to the repository?
7 months ago
I can't, the project is private =(
7 months ago
Well. We can do this the hard way.
Can you send any Node or Yarn config files that are present?
7 months ago
Don't see anything in there. Any other files that might be?
7 months ago
There’s no config file that could be causing this… =(
7 months ago
I’m not sure what other file I could send you to check. =(
7 months ago
I can pretty much say that there's only issue with what version of node has been picked.
Railpack currently picks node v22 by default as loudbook said upper.
So it has to be fine even without RAILPACK_NODE_VERSION provided in Variables. But im recommend to keep this variable in case you changed node version earlier in the project.
Can you show that upper text in "Build Logs" (as on my screenshot) so we can make sure that it picked correct node version? If it differs - maybe that's is the problem.
I can confirm. With node v22 my empty project with your package.json and "yarn build" set as custom build command it was built fine.
Attachments
7 months ago
Wow,
Thank you so, so much, everyone!
With your help and tips, I was able to find the problem, and it really was in my project's configuration.
I found the .nvmrc file, and it had version 20.11 — I changed it to 22, and that solved the issue. =)
Thank you so, so much, everyone.
Grateful!!
Status changed to Solved brody • 7 months ago

