a month ago
ID: ba726ff7-7939-43b9-a2c0-27f918bf9a1c
I just rebuild a project and got a error about vite:
You are using Node.js 18.20.5. Vite requires Node.js version 20.19+ or 22.12+. Please upgrade your Node.js version.
failed to load config from /app/vite.config.js
How can I lock the vite version to work with node 18.20.5
Attachments
10 Replies
a month ago
Hey, I suppose that using an older version of Vite (such as Vite 6) should work. You can lock a specific Vite 6 version by removing the ^ and specifying the version in question in your package.json.
Is there a reason why you have to stay on Node 18?
a month ago
I would suggest to use a newer Node version then, this way you don't really need to deal with an older version of Vite.
Error
Attachments
a month ago
Can you try specifying php ^8.4 in your composer.json?
I added this to my package.json
"engines": {
"node": "20.19"
},
and it worked
a month ago
Did you also try building with Railpack with the new configuration?