-
Notifications
You must be signed in to change notification settings - Fork 54
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
v6.10.7 "The requested module './matrix.js' does not provide an export named 'default'" #174
Comments
Can you provide a minimal reproduction? |
Please try again with v6.10.8. If it still doesn't work, please provide a way to reproduce. |
My apologies for not responding sooner! Thank you for your quick response! I will try v6.10.8 and let you know if I run into any issues! |
I discovered the issue. We were attempting to upgrade from v6.10.5 to version v6.10.8 and in those changes a change was made to how the package is exported which broke our use of it in a browser context. I had to instruct our dev server to treat ml-matrix as CommonJS instead of ES and we are good to go now. |
Would you be able to explain how you use it in a browser context? Maybe we can do something to fix it. |
Hi @targos I apologize for the late response but I would like to work through diagnosing and resolving this without a workaround. Currently I am using The error occurs on this line of the I believe the main problem is in the |
I still don't know how you're using the library in a browser context. Most of our apps are browser-based and work fine. |
Do you have a bundler / dev server ? |
Another interesting piece of information is that when building our app using Rollup, we need to use a commonjs plugin specifically for As for our dev server we use Modern Web's @web/dev-server. In order get |
This is a really complicated issue. I'm sorry, but I don't see how we can make a fix for your use case without breaking others (recent fixes were related to the default export and CommonJS-ESM interop). We need the package to work at least:
|
Thank you for your time responding to this! I will reach out to some other coworkers to see if we can come up with more ideas or solutions. I am curious, you mentioned that there are others using this package in a browser context. How are they using it that doesn't require them to force the CommonJS version? Are they using Vite or Webpack as their dev server and bundler and that is why it works for them? |
Yes, and to be clear, they are me and my team :) |
Awesome! Vite is something that we are interested in potentially transitioning to in the future so I will keep that in mind. I will reach back out after chatting with my team about solutions for getting this to work in our current situation. |
The same issue. |
Hi, Thank you for that package! I have exact the same issue here: Using ml-matrix in a browser as ES module does not work. Doesn't the extension ".mjs" indicate that this is a ES module and therefore it is an error to import any other type of module there? I would really appreciate if you could solve this issue and make .mjs a real ES module |
Hello, from your package.json
|
When upgrading from version 6.10.5 to 6.10.7, I am now getting this error in the


matrix.mjs
file.Here is what my import looks like:

Any help would be appreciated!
The text was updated successfully, but these errors were encountered: