Fouzan
Fouzan
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
Wonderful, I will definitely let you know even if all goes well.
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
It wasn't really my decision to do it like that, so I can't answer it properly. But one reason was that we are using supabase for other data, and we need to share it across apps although not all apps use directus.
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
keeping supabase as the database is a bit of a necessity, otherwise in case of no constraints it does make sense to keep the database within railway
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
Great, that sounds quite good
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
ok, thank you very much! I will look into the template you mentioned. I followed the tutorial to set it up with Supabase as the storage. Perhaps, I can do that with the tempalte as well.
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
https://supabase.com/partners/integrations/directus I used this to set up directus with supabase, could you tell me what is not ideal about it? Thank you a lot for taking the time to help me out btw
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
yes,
{
"name": "directus",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npx directus start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"directus": "^10.10.5",
"pg": "^8.11.5"
}
}
{
"name": "directus",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npx directus start"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"directus": "^10.10.5",
"pg": "^8.11.5"
}
}
this is the package.json for it,
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
No description
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
cause: Error: getaddrinfo ENOTFOUND directus.railway.internal
#12 50.12 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
#12 50.12 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
#12 50.12 errno: -3008,
#12 50.12 code: 'ENOTFOUND',
#12 50.12 syscall: 'getaddrinfo',
#12 50.12 hostname: 'directus.railway.internal'
#12 50.12 },
#12 50.12 digest: '2095498725'
#12 50.12 }
#12 50.12
#12 50.12 Error occurred prerendering page "/articles". Read more: https://nextjs.org/docs/messages/prerender-error
#12 50.12
#12 50.12 TypeError: fetch failed
#12 50.12 at Object.fetch (node:internal/deps/undici/undici:11372:11)
#12 50.12 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
#12 50.12 at async Object.request (/app/.next/server/chunks/330.js:15:33663)
#12 50.12 at async l (/app/.next/server/app/articles/page.js:1:2892)
#12 50.14
#12 50.14 > Export encountered errors on following paths:
#12 50.14 /articles/page: /articles

cause: Error: getaddrinfo ENOTFOUND directus.railway.internal
#12 50.12 at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
#12 50.12 at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
#12 50.12 errno: -3008,
#12 50.12 code: 'ENOTFOUND',
#12 50.12 syscall: 'getaddrinfo',
#12 50.12 hostname: 'directus.railway.internal'
#12 50.12 },
#12 50.12 digest: '2095498725'
#12 50.12 }
#12 50.12
#12 50.12 Error occurred prerendering page "/articles". Read more: https://nextjs.org/docs/messages/prerender-error
#12 50.12
#12 50.12 TypeError: fetch failed
#12 50.12 at Object.fetch (node:internal/deps/undici/undici:11372:11)
#12 50.12 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
#12 50.12 at async Object.request (/app/.next/server/chunks/330.js:15:33663)
#12 50.12 at async l (/app/.next/server/app/articles/page.js:1:2892)
#12 50.14
#12 50.14 > Export encountered errors on following paths:
#12 50.14 /articles/page: /articles

43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
yes, the next.js and directus are within the same project, and I am using server side to make directus requests.
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
The faq answers this, just saw that one so thank you again. But still does not solve my issue, I think it might have something to do with ipV6 with directus, I tried different solutions but none seem to be working
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
Thank you, I did already look into this although this confuses me a bit:
"A web application that makes client-side requests cannot communicate to another service over the private network."
Does this mean internal routing would not work with next.js?
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
No problem of course :))
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
I most probably will ask there as well. Thank you for taking the time to help me out.
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
So, my next.js will fetch the data with server functions, and then display it on the client. The user would just access the next.js site, perhaps I completely misunderstand how this is supposed to be working. But my understanding is that I would connect the next.js app with directus using nexjs server features. Wouldn't that work like connecting a backend to directus?
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
Why cannot it be in the private network? Thank you a lot for helping out btw
43 replies
RRailway
Created by Fouzan on 4/25/2024 in #✋|help
Issue regarding connecting Directus and Next.js with internal routing
N/A
43 replies