Open varun-yp opened 3 years ago
Hi, but sorry this package is not @types/matrix-js-sdk
. This repo is another community maintained type definition that requires a special way to install (you can see the README for this repo).
@huan is the maintainer of @types/matrix-js-sdk
, can you help?
And I suggest you to console.log(sdk)
to see what JS value it exactly contains. It seems like it's a bundler problem, not a type of definition problem.
And I suggest you to
console.log(sdk)
to see what JS value it exactly contains. It seems like it's a bundler problem, not a type of definition problem.
yes, I believe it is a bundler problem as well. Just trying to figure how to resolve it.
Thanks for mentioning me.
I have only used the SDK in node, however, I live angular and ionic, so I'd like to have a look at it if there's any minimum reproducible open source repo.
Describe the bug matrix-js-sdk is not working with Ionic 5 or Angular framework.
To Reproduce
Install ionic and select angular as javascript framework
Navigate into the project and install matrix-js-sdk and its typings
Modify tsconfig.json to add following path and exclude details
Modify app.components.ts to import and use the sdk.
Expected behavior Expected the client to be created and started, but got webpack module error (screenshot attached), informing createClient is not a function. The same does not work on standalone angular framework as well.
Screenshots
Desktop (please complete the following information):
Additional context Any help on its usage or workaround for Ionic 5 / Angular framework will be helpful.
Same is posted on the original matrix-js-sdk... hoping to get a response, either there or here. https://github.com/matrix-org/matrix-js-sdk/issues/1995