#local setup up for nextjs+drupal

13 messages · Page 1 of 1 (latest)

graceful fable
#

I want to connect the drupal cms for my project how can i link my nextjs frontend to the drupal backend on local . it working fine on live showing data very well but not on local

snow widget
#

what did you try, what didn't work
-> do you have an error message server-side or client-side, in Next.js or Drupal?
-> how is your connection configured, via an environment variables?

next meadow
#

Hello @snow widget! I am not the OP, but this is the only thread I have found when searching for Drupal in this forum. I too am trying to source from Drupal - using ChapterThree's next-drupal setup.

#

I am running Next.js 13.5.6, Node 18.17.1, Drupal 10

#

My specific error is this one, which I get right out of the starting gate:

#
Error: Failed to fetch JSON:API index at https://next-drupal-01.ddev.site/jsonapi - fetch failed
#

I guess my preference would be to use GraphQL, but I figured I'd try JSON:API since the tutorial for next-drupal uses it.

#

Anyway, thanks for any help you are able to offer!

next meadow
#

@graceful fable did you ever get your setup to work?

snow widget
#

hmm might be a dumb answer but is the site available?

#

fetch failed is literally a fail in fetching, not a wrong response status