Skip to content

[graphiql] simpleWorker.js can't access property "schemas" when using the cdn example #4108

@alf

Description

@alf

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I get the following errors in the browser console:

setup-workers/esm.sh 
Object { label: "json" }
[esm.sh.js:9:13](https://esm.sh/@graphiql/[email protected]/es2022/esm/npm/@graphiql/[email protected]/node_modules/@graphiql/react/dist/setup-workers/esm.sh.js)
Script error. [simpleWorker.js:29:13](https://esm.sh/@graphiql/[email protected]/X-ZUBlbW90aW9uL2lzLXByb3AtdmFsaWQsQGdyYXBoaXFsL3Rvb2xraXQsZ3JhcGhxbCxyZWFjdCxyZWFjdC1kb20/esm/npm/@graphiql/[email protected]/node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js)
TypeError: can't access property "schemas", l is undefined [json.worker.mjs:61:6527](https://esm.sh/[email protected]/es2022/esm/vs/language/json/json.worker.mjs)
Uncaught 
error { target: Worker, isTrusted: true, message: "Script error.", filename: "", lineno: 0, colno: 0, error: undefined, srcElement: Worker, eventPhase: 0, bubbles: false, … }
[errors.js:18:13](https://esm.sh/@graphiql/[email protected]/X-ZUBlbW90aW9uL2lzLXByb3AtdmFsaWQsQGdyYXBoaXFsL3Rvb2xraXQsZ3JhcGhxbCxyZWFjdCxyZWFjdC1kb20/esm/npm/@graphiql/[email protected]/node_modules/monaco-editor/esm/vs/base/common/errors.js)

Expected Behavior

I expect the console to not log error messages.

Steps To Reproduce

I copy the index.html file from graphiql-cdn example and load it in my webbrowser (through python -m http.server). This seems to work well, but if I look at the developer console while I edit the query I get the reported errors.

Environment

  • GraphiQL Version: latest
  • OS: NixOS
  • Browser: Firefox 142.0.1
  • Bundler: CDN

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions