Skip to content

CORS/404 errors from pg_graphiql while following quickstart #584

@mtilda

Description

@mtilda

While following the QuickStart instructions, when I open the GraphiQL interface at http://localhost:4000/, I get several errors from unpkg.

To Reproduce

  1. First, clone the repo:

    git clone https://github.com/supabase/pg_graphql.git
    cd pg_graphql
    
  2. Next, launch the demo with docker-compose.

    docker compose up
    
  3. Finally, access GraphiQL at http://localhost:4000/. <-- This gives the following errors

Access to script at 'https://unpkg.com/react-dom@19.1.0/umd/react-dom.production.min.js' (redirected from 'https://unpkg.com/react-dom/umd/react-dom.production.min.js') from origin 'http://localhost:4000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://unpkg.com/react-dom@19.1.0/umd/react-dom.production.min.js net::ERR_FAILED 404 (Not Found)
Access to script at 'https://unpkg.com/react@19.1.0/umd/react.production.min.js' (redirected from 'https://unpkg.com/react/umd/react.production.min.js') from origin 'http://localhost:4000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://unpkg.com/react@19.1.0/umd/react.production.min.js net::ERR_FAILED 404 (Not Found)
Uncaught TypeError: Cannot read properties of undefined (reading '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED')
    at react-jsx-runtime.development.js:52:34
    at ../../../node_modules/react/cjs/react-jsx-runtime.development.js (react-jsx-runtime.development.js:1313:4)
    at __webpack_require__ (bootstrap:19:1)
    at ../../../node_modules/react/jsx-runtime.js (jsx-runtime.js:6:3)
    at __webpack_require__ (bootstrap:19:1)
    at ../../graphiql-react/dist/index.js (mode.ts:115:1)
    at __webpack_require__ (bootstrap:19:1)
    at cdn.ts:7:1
    at graphiql.min.js:96194:2
    at graphiql.min.js:96196:12
Uncaught ReferenceError: GraphiQL is not defined
    at (index):24:23

Metadata

Metadata

Assignees

Labels

triage-requiredPending triage from maintainers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions