Trying to run my plugin in Obsidian now crashes, giving me:
Plugin failure: xxxxxx TypeError: Class extends value undefined is not a constructor or null
at anonymous (duplexify.js:50:25)
at e. (app.js:1:1547485)
at app.js:1:235078
at Object.next (app.js:1:235183)
Has anyone already faced such circular dependency errors? Any idea on how to debug this?
To your package.json and report whether that fixes the error or not? This would indicate whether it is caused by a breaking change in the readable-stream package.
Hi from the Developer Tools team at Inrupt, we’re aware of these circular dependencies, however, we’ve never yet seen these be a source of a crash during builds or usage of our SDKs (though I did start work a year ago to attempt to resolve, it’s tricky without potentially breaking API, something we avoid as much as possible)
Thank you for your reply. Indeed I can see that this wasn’t really a problem and I am still trying to identify the root cause of the many issues I’m having since I introduced the inrupt libraries in my project.
I am suspecting something rather deep-rooted, as it looks that, whatever I try to do in my setup is doomed to fail somehow… but I can’t quite put my finger on it, yet.
Thank you. And I just replied. Unfortunately using @inrupt/solid-client-authn-node instead of @inrupt/solid-client-authn-browser doesn’t solve the issue.
Summary for anyone else finding this thread, the warnings were exactly that, and the issue faced appears to have been due to the build tooling being used (looked like it was building for browser but trying to be run in node.js, where different APIs exist for now)
To be a little bit more precise, the build tool is rollup.js in this case. And the one thing that had everything collapse in unpredictable ways is the use of a plugin to this build tool, namely nodeResolve. Even if everything is reset to target node exclusively (thus not browser), in my case, the code does not work. Essentially it looks like one of this plugin’s side-effects is that it will rename some global dependencies; e.g. crypto will be renamed crypto_1, and thus any code that refers to crypto from the global context will crash.