You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get the latest release candidate to work with webpack. Now I'm not a javascript expert so this could very well be me overlooking something basic.
ERROR in ./node_modules/matrix-js-sdk/lib/client.js 1111:29-52
Module not found: Error: Can't resolve './rust-crypto' in '<project dir>/node_modules/matrix-js-sdk/lib'
If I comment out that line in ./node_modules/matrix-js-sdk/lib/client.js it will build but I get the following error in the browser console:
Uncaught ReferenceError: global is not defined
qh matrix.js:116
Vh matrix.js:134
9820 index.js:2
Webpack 3
I can't get the latest release candidate to work with webpack. Now I'm not a javascript expert so this could very well be me overlooking something basic.
I made a small project to reproduce the issue: https://github.com/Harm-van-Stekelenburg/import_webpack__matrix_js
I run into two problems with this project:
npm run serve
I get the error:./node_modules/matrix-js-sdk/lib/client.js
it will build but I get the following error in the browser console:I think that means the global here: https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/matrix.ts#L133
I get neither error on version 34.3.1.
I can fix the second problem with the webpack define plugin to redefine global to something like
window
but that seems a bit unnecessary.The text was updated successfully, but these errors were encountered: