digitalbazaar / jsonld.js

A JSON-LD Processor and API implementation in JavaScript
https://json-ld.org/
Other
1.66k stars 195 forks source link

Node.js 14 compatibility #443

Closed entermix closed 3 years ago

entermix commented 3 years ago

The documentation says that Node.js >= 12 is supported.

I am trying to install the jsonld package (5.0.0), but in the process I get errors:

C:\***\***\***>yarn add jsonld
yarn add v1.22.10
[1/4] Resolving packages...
warning jsonld > @digitalbazaar/http-client > ky-universal > node-fetch@3.0.0-beta.6-exportfix: This release contains some TypeScript definition issues and we therefore recommend to update to the next version. Changelog: https://git
.io/JfV1D
warning jsonld > @digitalbazaar/http-client > ky-universal > node-fetch > fetch-blob@1.0.7: This release contains breaking changes, so it has been renamed to 2.0.0. Changelog: https://git.io/JfSDh
[2/4] Fetching packages...
error fetch-blob@1.0.7: The engine "node" is incompatible with this module. Expected version "^10.17.0". Got "14.15.4"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
C:\***\***\***>node -v
v14.15.4

It seems that some of the packages required for a successful installation are out of date. What can be done in this case?

Thanks!

davidlehn commented 3 years ago

Looks like some indirect dependencies need to be updated. There's a potential issue using the latest ky and ky-universal since they were changed to esm and would (maybe) require node 14. But it looks like at least more recent versions can be used that might fix the issues here.

Follow here: https://github.com/digitalbazaar/http-client/pull/6

davidlehn commented 3 years ago

Should be fixed in v5.1.0+, which uses @digitalbazaar/http-client v1.1.0 with updated dependencies.