Open-Attestation / open-attestation

Meta framework for providing digital provenance and integrity to documents.
https://openattestation.com
Apache License 2.0
54 stars 18 forks source link

BUG: broken dependency, can't resolve rdf-canonize-native in webpack build. #164

Closed Neketek closed 3 years ago

Neketek commented 3 years ago

image

Hi, I noticed this problem a long ago, but I thought that it was caused by an old dependency and that by this moment it is going to be fixed. But it's not, therefore, here I am, writing this issue.

As far as I understand, the situation here is pretty simple. Your code uses jsonld which uses rdf-canonize which uses rdf-canonize-native. Judging by the issues I've read at rdf-canonize project, rdf-canonize-native broke several months ago, therefore, the devs decided to simply exclude it from rdf-canonize deps.

The strange solution, but apparently, rdf-canonize-native is an optional dependency, therefore, it doesn't completely break everything, but causes this very suspicious message to appear each time my project starts without rdf-canonize-native: "WARNING: Missing strong random number source". So, I guess, you can understand why I'm concerned, and I think that you should probably be concerned too.

If you say, that this isn't a critical issue, I'll be ok with that, but I still suggest you should try to upgrade jsonld to version 5. Maybe they fixed this obvious problem in the latest version.

Nebulis commented 3 years ago

Hi, thanks for the report

SO far we use jsonld only on OA v3, which is in beta. So no critical issue.

Try t upgrade to 5.1.2, it uses json ld v4, maybe it fixes the issue, Otherwise we can try to upgrade to jsonld v5

Neketek commented 3 years ago

image @Nebulis Thanks for the quick response. Tested your suggestions as soon as I got a chance. So, as a result of the upgrade, the previous error message didn't go away, but a new one appeared, but as far as it doesn't affect v2 functionality I'm fine with that.