Open jeswr opened 1 month ago
When trying to run npm run build on https://github.com/jeswr/microsoft-kg-as-rdf the following error consistently occurs:
npm run build
> email_api_test@1.0.0 build > ldo build --input ./shex --output ./ldo ◠ Generating LDO Documents/home/jeswr/Documents/GitHub/jeswr/email_api_test/node_modules/jsonld-context-parser/lib/ContextParser.js:722 throw new ErrorCoded_1.ErrorCoded(`Failed to load remote context ${url}: ${e.message}`, ErrorCoded_1.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED); ^ ErrorCoded: Failed to load remote context http://www.w3.org/ns/shex.jsonld: fetch failed at ContextParser.load (/home/jeswr/Documents/GitHub/jeswr/email_api_test/node_modules/jsonld-context-parser/lib/ContextParser.js:722:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:540:9) at process.processTimers (node:internal/timers:514:7) at async ContextParser.parse (/home/jeswr/Documents/GitHub/jeswr/email_api_test/node_modules/jsonld-context-parser/lib/ContextParser.js:588:58) { code: 'loading remote context failed' } Node.js v20.11.0
I suspect the best fix would be to use a custom document loader to cache http://www.w3.org/ns/shex.jsonld and supply that context to jsonld-context-parser. A brief look indicates that the jsonld-context-parser call is coming from the https://github.com/o-development/jsonld2graphobject dependency.
jsonld-context-parser
I would also recommend using the https context rather than the http context which redirects to the https context.
When trying to run
npm run build
on https://github.com/jeswr/microsoft-kg-as-rdf the following error consistently occurs:I suspect the best fix would be to use a custom document loader to cache http://www.w3.org/ns/shex.jsonld and supply that context to
jsonld-context-parser
. A brief look indicates that thejsonld-context-parser
call is coming from the https://github.com/o-development/jsonld2graphobject dependency.