Mesh - FHIR Failed to generate the schema Error: Unable to load fhir.schema.json
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure Mesh package versions under
package.jsonmatches yours.
- [ ] 2. A failing test has been provided
- [ ] 3. A local solution has been provided
- [ ] 4. A pull request is a pending review
Describe the bug
I am trying to run the project given in the example project given in this repository called json-schema-fhir
To Reproduce Steps to reproduce the behaviour:
clone this repository json-schema-fhir
https://codesandbox.io/p/github/nirzaf/json-schema-fhir/draft/upbeat-shtern?file=%2Fexample-queries%2Fpatient.query.graphql&selection=%5B%7B%22endColumn%22%3A2%2C%22endLineNumber%22%3A18%2C%22startColumn%22%3A2%2C%22startLineNumber%22%3A18%7D%5D&workspace=%257B%2522activeFileId%2522%253A%2522cl85mvl6n0009lpgl7hjocn5x%2522%252C%2522openFiles%2522%253A%255B%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522key%2522%253A%2522cl85n6k28000k356hw6iyfgvq%2522%252C%2522type%2522%253A%2522PROJECT_SETUP%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522start%2522%252C%2522key%2522%253A%2522cl85muipb0008356hv6chabsl%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D
yarn install
yarn run
Expected behaviour
Should begin the localhost:3000 server and should be able to query hapi.fhir.org via graphql
Environment:
- OS: Windows 11
-
- yarn --version 1.22.15
-
@graphql-mesh/...: - NodeJS: node --version v16.16.0
Additional context package.json file
{
"name": "json-schema-fhir",
"version": "0.0.285",
"license": "MIT",
"private": true,
"scripts": {
"download-fhir-schema": "node scripts/download-fhir-schema.js",
"build": "mesh build",
"start": "mesh dev",
"start:prod": "mesh start"
},
"dependencies": {
"@graphql-mesh/cli": "0.78.15",
"@graphql-mesh/json-schema": "0.35.12",
"graphql": "16.6.0",
"unzip-stream": "0.3.1"
}
}
##Complete error log
npm WARN config global --global, --local are deprecated. Use --location=global instead.
[email protected] start mesh dev
� �️ Mesh - Server Generating the unified schema... � �️ Mesh - FHIR Failed to generate the schema Error: Unable to load ./fhir.schema.json from C:\Users\mmfazrin\RiderProjects\json-schema-fhir at C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:157:35 at async dereferenceObject (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:150:40) at async dereferenceObject (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:265:36) at async dereferenceObject (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:265:36) at async dereferenceObject (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:265:36) at async Object.dereferenceObject (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules\json-machete\index.js:265:36) at async getDereferencedJSONSchemaFromOperations (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules@omnigraph\json-schema\index.js:303:35) at async Object.createBundle (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules@omnigraph\json-schema\index.js:2282:32) at async Object.getWithSet (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules@graphql-mesh\store\index.js:160:38) at async JsonSchemaHandler.getMeshSource (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules@graphql-mesh\json-schema\index.js:50:24) � �️ Mesh - Server Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh with DEBUG=1 environmental variable to get more verbose output. at Object.getMesh (C:\Users\mmfazrin\RiderProjects\json-schema-fhir\node_modules@graphql-mesh\runtime\index.js:554:15)
I cannot run the sandbox;
Could you update it? It doesn't reproduce your error currently.
I also got the same Permission denied error in the sandbox. Can you clone the repository locally and try please https://github.com/nirzaf/json-schema-fhir
It is not starting the localhost server as well

I manage to run the server. but cannot Query anything
These are screenshot samples of queries which are available in the sample queries folder in the same project using same FHIR resources URL http://hapi.fhir.org/base64
It seems you use an older version because we don't have a command like mesh serve today.
could you try this example as-is without modifying it?
https://github.com/Urigo/graphql-mesh/tree/master/examples/json-schema-fhir
It seems you use an older version because we don't have a command like
mesh servetoday. could you try this example as-is without modifying it? https://github.com/Urigo/graphql-mesh/tree/master/examples/json-schema-fhir
Got this error

Repository Link https://github.com/nirzaf/graphql-mesh/tree/master/examples/json-schema-fhir