Giter Site home page Giter Site logo

Comments (10)

treboryx avatar treboryx commented on May 18, 2024 1

Yeah that .cache folder can be a major headache with gatsby, all the testing and work done in there lately I automatically delete it before doing anything.

So all working as expected after updating the env var and clearing cache?

Yep! Everything working as expected

from gatsby-source-directus.

rijkvanzanten avatar rijkvanzanten commented on May 18, 2024

Linear: ENG-58

from gatsby-source-directus.

freekrai avatar freekrai commented on May 18, 2024

@treboryx there was an issue on previous versions that didn't pass the headers correctly and generated this message but that was fixed in the most recent release, if you've updated to the most recent, can you try deleting your .cache folder and re-run please?

from gatsby-source-directus.

treboryx avatar treboryx commented on May 18, 2024

@treboryx there was an issue on previous versions that didn't pass the headers correctly and generated this message but that was fixed in the most recent release, if you've updated to the most recent, can you try deleting your .cache folder and re-run please?

I tried all that before bothering you guys.

clean install, removed the .cache dir

I even re-cloned the examples repository in a new directory to test it and I get the same error.

Is it possible that it's something else?

from gatsby-source-directus.

freekrai avatar freekrai commented on May 18, 2024

I've run the example four times this morning and didn't repeat. (And deleted .cache each time)

  1. Are the url and credentials correct
  2. Are permissions correct on your site? If using the admin credentials then shouldn't matter but if the credentials are for another user then they'd need to be configured correctly.
  3. If you try to access the graphql using a tool like postman what does it return?

from gatsby-source-directus.

treboryx avatar treboryx commented on May 18, 2024

I've run the example four times this morning and didn't repeat. (And deleted .cache each time)

  1. Are the url and credentials correct
  2. Are permissions correct on your site? If using the admin credentials then shouldn't matter but if the credentials are for another user then they'd need to be configured correctly.
  3. If you try to access the graphql using a tool like postman what does it return?

Everything is the default provided by the examples repository. I have ensured that the example credentials work correctly, but the issue persists.

I also tried a GraphQL query on postman, and that seems to work.

I have recorded the whole process, from cloning to running both directus and gatsby, if it's of any help

Code_B0wwiVHkiG.mp4

from gatsby-source-directus.

freekrai avatar freekrai commented on May 18, 2024

@treboryx Ok, you're hitting an issue in node 18.

In your .env, replace:

GATSBY_DIRECTUS_URL=http://localhost:8055

with:

GATSBY_DIRECTUS_URL=http://127.0.0.1:8055

I'll push an update shortly that changes this to no longer mention localhost but that's your issue provided the credentials haven't been changed, etc

from gatsby-source-directus.

freekrai avatar freekrai commented on May 18, 2024

The examples have been updated as of directus-labs/examples#177 and merged to reflect this URL change everywhere.

from gatsby-source-directus.

treboryx avatar treboryx commented on May 18, 2024

Thank you, I thought I had tried this already but I may have not deleted the cache 😅

from gatsby-source-directus.

freekrai avatar freekrai commented on May 18, 2024

Yeah that .cache folder can be a major headache with gatsby, all the testing and work done in there lately I automatically delete it before doing anything.

So all working as expected after updating the env var and clearing cache?

from gatsby-source-directus.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.