-
Notifications
You must be signed in to change notification settings - Fork 102
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
Cannot use versions >v11.2.0 in a pure ESM project #990
Comments
For now, our fix is to remove the constraints in our project to be an ES module. This works for us as we currently don't have other dependencies in this project that have the same constraints. |
Yes, this is a head-ache for us too, I'll have to have another look at this. I think it might be difficult since we ourselves depend on things that only are CommonJS. So we might by lying to Node.js by saying it's |
It looks like it's the debug package, we should probably replace it with a simple utility or something like |
For anyone having an issue using Next.js when running import dynamic from "next/dynamic";
// import { MediaStreamLibComponent } from "./";
const MediaStreamLibComponent = dynamic(() => (await import("./")).MediaStreamLibComponent, { ssr: false });
export default const Page = () => {
return (
<MediaStreamLibComponent/>
);
} |
Hello! We're using the media-stream-library in a NodeJS project that is configured to only allow 'import' syntax. This still allows importing CommonJS modules, and we haven't had any issues with this in the past.
However, if we upgrade the media-stream-library beyond v11.2.0, we get the following error at runtime (This is with v13.1.1):
From what I can tell, there seems to be require syntax in an mjs file that causes the issue.
Any thoughts?
The text was updated successfully, but these errors were encountered: