R
Railway•12mo ago
linda_

Node.js v18.12.1 is not supported by Astro, how to update to : ">=18.14.1"?

Anyone can help me, please? Got this error while building Astro, how to update to : ">=18.14.1"? The repository: https://github.com/withLinda/AstroWind
[stage-0 8/10] RUN --mount=type=cache,id=s/776fe4ba-df86-4435-b8a3-68a7e5c106b7-node_modules/cache,target=/app/node_modules/.cache npm run build --no-cache:
0.738 > @onwidget/astrowind@1.0.0-beta.4 build 0.738 > astro build 0.738 0.848 Node.js v18.12.1 is not supported by Astro! 0.848 Please upgrade Node.js to a supported version: ">=18.14.1" 0.848 0.851 null CI Environment Detected! 0.851 Additional steps may be needed to set your Node.js version: 0.851 Documentation: https://docs.astro.build/guides/deploy
GitHub
GitHub - withLinda/AstroWind: Trying Astro 3.0 + Tailwind CSS for m...
Trying Astro 3.0 + Tailwind CSS for my website. Contribute to withLinda/AstroWind development by creating an account on GitHub.
35 Replies
Percy
Percy•12mo ago
Project ID: 776fe4ba-df86-4435-b8a3-68a7e5c106b7
Medim
Medim•12mo ago
Weird, cause u are specifying "node": ">=18.14.1" on ur package.json what happens if u just put the major version "node": ">=18.14"?
linda_
linda_•12mo ago
Already put "engines": { "node": ">=18.14" } still the same error
[stage-0 8/10] RUN --mount=type=cache,id=s/776fe4ba-df86-4435-b8a3-68a7e5c106b7-node_modules/cache,target=/app/node_modules/.cache npm run build --no-cache:
0.773 > @onwidget/astrowind@1.0.0-beta.4 build 0.773 > astro build 0.773 0.899 Node.js v18.12.1 is not supported by Astro! 0.899 Please upgrade Node.js to a supported version: ">=18.14.1" 0.899 0.903 null CI Environment Detected! 0.903 Additional steps may be needed to set your Node.js version: 0.903 Documentation: https://docs.astro.build/guides/deploy
ThallesComH
ThallesComH•12mo ago
try to specify the version without any semver "node": "18.14.1" if it doesn't work, i would go with a Dockerfile
linda_
linda_•12mo ago
still the same error. is there any documentation how to build it with dockerfile?
ThallesComH
ThallesComH•12mo ago
you can use the dockerfile provided by Astro https://docs.astro.build/en/recipes/docker/
Astro Documentation
Build your Astro Site with Docker
Learn how to build your Astro site using Docker.
ThallesComH
ThallesComH•12mo ago
railway automatically detects the Dockerfile and build from there also, you probably don't need railway.json or railway.toml.
linda_
linda_•12mo ago
alright, I'll try and I'll update tomorrow, thank you so much for your guidance
ThallesComH
ThallesComH•12mo ago
if you can, try to remove railway.json or railway.toml. I don't know if Railway (nixpacks) will not use the engine provided in package.json because of those files. just a guess
linda_
linda_•12mo ago
ok, will start from the scratch without 'railway.toml' and 'railway.json'
Brody
Brody•12mo ago
you can do this without a dockerfile it's easier if I explain by showing you, but for that I'd need to see your nixpacks.toml and railway.json files
linda_
linda_•12mo ago
{ "$schema": "https://railway.app/railway.schema.json", "build": { "builder": "NIXPACKS", "buildCommand": "npm run build" }, "deploy": { "numReplicas": 1, "startCommand": "npm run start", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } }
Brody
Brody•12mo ago
okay you only have a railway.json?
linda_
linda_•12mo ago
toml [build] builder = "NIXPACKS" buildCommand = "npm run build --no-cache" [deploy] numReplicas = 1 startCommand = "npm run start" restartPolicyType = "ON_FAILURE" restartPolicyMaxRetries = 10
Brody
Brody•12mo ago
okay delete the railway.toml
Want results from more Discord servers?
Add your server