Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh - FHIR Failed to generate the schema Error: Unable to load fhir.schema.json #4512

Open
4 tasks
nirzaf opened this issue Sep 17, 2022 · 6 comments
Open
4 tasks

Comments

@nirzaf
Copy link

nirzaf commented Sep 17, 2022

Issue workflow progress

Progress of the issue based on the Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches 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.

json-schema-fhir@0.0.285 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)

@ardatan
Copy link
Owner

ardatan commented Sep 17, 2022

I cannot run the sandbox;
image
Could you update it? It doesn't reproduce your error currently.

@nirzaf
Copy link
Author

nirzaf commented Sep 18, 2022

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

@nirzaf
Copy link
Author

nirzaf commented Sep 18, 2022

It is not starting the localhost server as well
image

@nirzaf
Copy link
Author

nirzaf commented Sep 18, 2022

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

image

image

@ardatan
Copy link
Owner

ardatan commented Sep 18, 2022

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

@nirzaf
Copy link
Author

nirzaf commented Sep 19, 2022

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

Got this error
image

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

This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants