Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing via npmjs #22

Open
rcarjan opened this issue Feb 19, 2023 · 0 comments
Open

Installing via npmjs #22

rcarjan opened this issue Feb 19, 2023 · 0 comments

Comments

@rcarjan
Copy link

rcarjan commented Feb 19, 2023

Hello,
I am trying to install matrix-crdt in an existing angular 15 project, and it seems that the build succeeds, somehow, yet when I access the page in the browser, it's blank. Here is the output from the build command:

yarn install v1.22.19
[1/4] Resolving packages...
error Couldn't find package "@matrix-org/matrix-sdk-crypto-js" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
/docker-entrypoint.sh: Configuration complete; ready for start up
- Generating browser application bundles (phase: setup)...
- Generating index html...
✔ Browser application bundle generation complete.
✔ Index html generation complete.
- Generating service worker...
✔ Service worker generation complete.
- Generating index html...
✔ Browser application bundle generation complete.
✔ Index html generation complete.
- Generating service worker...
✔ Service worker generation complete.

Here is my package.json: https://pastebin.com/XLFQWLXa
And here is my tsconfig.json: https://pastebin.com/fDqMD86H

I've also tried removing matrix-js-sdk from the package.json, since I already import browser-matrix.js, from the same package, which exposes the matrixcs object in the window, yet that doesn't seem to work either. Here is the build output in this scenario:

yarn install v1.22.19
[1/4] Resolving packages...
warning @codemirror/[email protected]: As of 0.20.0, this package has been merged into @codemirror/state
warning @angular/cli > pacote > @npmcli/run-script > node-gyp > make-fetch-happen > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "codemirror > @codemirror/[email protected]" has unmet peer dependency "@lezer/common@^1.0.0".
warning " > [email protected]" has unmet peer dependency "lib0@*".
warning " > [email protected]" has unmet peer dependency "matrix-js-sdk@*".
warning " > [email protected]" has unmet peer dependency "y-protocols@*".
warning " > [email protected]" has unmet peer dependency "@codemirror/language@^6.0.0".
warning " > @angular/[email protected]" has incorrect peer dependency "@angular/[email protected]".
warning " > @angular/[email protected]" has incorrect peer dependency "@angular/[email protected]".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 121.34s.
/docker-entrypoint.sh: Configuration complete; ready for start up
- Generating browser application bundles (phase: setup)...
Processing legacy "View Engine" libraries:
- @ngxs/store/internals [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/logger-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/storage-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store/operators [es2015/esm2015] (git+https://github.com/ngxs/store.git)
Encourage the library authors to publish an Ivy distribution.
- Generating index html...
✔ Browser application bundle generation complete.
✔ Index html generation complete.
- Generating service worker...
✔ Service worker generation complete.
- Generating index html...
✔ Browser application bundle generation complete.
✔ Index html generation complete.
- Generating service worker...
✔ Service worker generation complete.

If I try to revernt to the default angular generated tsconfig ( https://pastebin.com/ndhd1StS ), matrix sdk seems to work, and I can instance a matrixClient, however when I try to import and use a MatrixProvider, this is the output I get: https://pastebin.com/QBDmfjpp

I'm kind of running out of ideas. Is there anything I'm doing wrong? Or does matrix-crdt simply not work with angular?
Any sort of help is greatly appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant