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

Multiple matrix-js-sdk entrypoints detected! #4597

Open
Jenish-Dhanani opened this issue Dec 24, 2024 · 2 comments
Open

Multiple matrix-js-sdk entrypoints detected! #4597

Jenish-Dhanani opened this issue Dec 24, 2024 · 2 comments

Comments

@Jenish-Dhanani
Copy link

Using next js version 13.4.19, matrix-js-sdk version ^34.13.0, While running npm run build

Getting following error:
Error: Multiple matrix-js-sdk entrypoints detected!
image

Tried to solve as per this #3446 but not worked, Can anyone please guide correct way to solve this.

// MatrixSDK.js
import * as MatrixJsSDK from "matrix-js-sdk";

const createClient = MatrixJsSDK.createClient;
const MatrixEvent = MatrixJsSDK.MatrixEvent;
const RoomEvent = MatrixJsSDK.RoomEvent;
const EventTimeline = MatrixJsSDK.EventTimeline;
const EventType = MatrixJsSDK.EventType;
const MsgType = MatrixJsSDK.MsgType;
const RelationType = MatrixJsSDK.RelationType;
const MatrixEventEvent = MatrixJsSDK.MatrixEventEvent;
const TimelineWindow = MatrixJsSDK.TimelineWindow;
const RelationsEvent = MatrixJsSDK.RelationsEvent;
const SearchOrderBy = MatrixJsSDK.SearchOrderBy;
const RoomStateEvent = MatrixJsSDK.RoomStateEvent;

export {
createClient,
MatrixEvent,
RoomEvent,
EventTimeline,
EventType,
MsgType,
RelationType,
MatrixEventEvent,
TimelineWindow,
RelationsEvent,
SearchOrderBy,
RoomStateEvent,
};

@richvdh
Copy link
Member

richvdh commented Dec 24, 2024

It sounds like you are not importing the library consistently.

Please provide reproduction steps.

@Jenish-Dhanani
Copy link
Author

It seems like having problem when we import it on SSR (server side render components).

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

No branches or pull requests

2 participants