Local OK, Railway problems
In local all works, but in prod (railway) i have error with fetch
37 Replies
Project ID:
60cee507-70ce-477a-be3d-d91c81e600ac
You might find these helpful:
- Strapi & Railway - Dev env
- CORS error when using railway run npm run dev
- AWS s3 - not loading pdf's to Railway production - Rails app
ā ļø experimental feature
must be running an old node version
How i can change ?
node 16 doesnt have fetch api enabled by default, v18 does set NIXPACKS_NODE_VERSION to 18
set
NIXPACKS_NODE_VERSION = 18
Node | Nixpacks
App source + Nix packages + Docker = Image
in env variables ?
in service variables
hmm
š
i dont know where is it
2m i check
click on your service, variables tab > new variable
š
here?
^
so here?
yes
NIXPACKS_NODE_VERSION = 18
Ah ok, I thought that variable service and environment variables was not the same thing
i test it !
thats work
awsome
but
š¦
not awsome
yeah
oh its because i have an package-lock.json i think
i delete it for test
try running in your project directory and try a redeploy, it looks to me like your lock file is out of sync with your package.json file
no
okay
lol no, you very much need that, it needs to be in sync with package.json, so try running the above command, then redeploy
that's work but
no clue, you can try different versions of the swc wasm package, and if you want to provide me with a minimal reproducible example i could take a look at it too
okay i test different version and reply you if ok/not ok
good luck š
bro i just commited a package.json with differents version and i see when i look deployement i have a deployemnt successfuly š
so a different version of swc wasm works?
I just committed different versions and it works too, even with the one I didn't care that it worked
so, all good! thanks for your help !!
no problem, glad you got it working! happy coding