Closed cdanny358 closed 1 year ago
Update: this seems to be a problem only when Directus is hosted locally. Seems to work fine with Node 18 when Directus is hosted on a remote server. Might it have to do with http vs https?
Update 2: Found the solution. It doesn't like localhost
in the URL. Changing to the actual IP address of my computer, or even 127.0.0.1
, fixes it. Apparently Node v17 and up resolves localhost
to an IPv6 address rather than the IPv4 address of earlier Node versions.
Update 2: Found the solution. It doesn't like
localhost
in the URL. Changing to the actual IP address of my computer, or even127.0.0.1
, fixes it. Apparently Node v17 and up resolveslocalhost
to an IPv6 address rather than the IPv4 address of earlier Node versions.
Thanks for the update! Bumped into the same issue in directus/examples#173 and instantly recalled your update here.
Gatsby 5 requires Node 18, but as soon as I upgrade Node from v16.18.1 to v18.12.1, gatsby-source-directus fails with this error:
In Node 16 this error doesn't occur, and the project builds properly. In
gatsby-config.js
, the plugin is configured like this: