-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Doesn't work with Vitejs #594
Comments
Yeah likewise I encountered the same problem 🤔 |
Hey @simoneb is there any work around you did about this to work? |
I fiddled around with the installed package's package.json file but it wasn't by any means a robust solution. The fix should be fairly simple though, it's just a matter of getting the exports right in the package file. |
same here |
While this is not fixed, here is a temporary solution at least worked for me, btw i'm using yarn. add this to your package.json file: "resolutions": { |
My less than ideal workaround to get it going before this is fixed is just loading via script tags |
I've created a draft PR (#604) with an implementation that works locally, but I'm not too happy with. I'm new to package exports, so it's all a little blurry, hence why I'm keeping this one as a draft, but hopefully that's a start to fix the issues and could do with some help to finish it off. Both for a new vite app and a new CRA app, I've linked the package locally with
Both apps run fine without runtime errors and display the series in the console. However, types don't work, and I get the following error in CRA terminal output:
|
Has anyone figured out how to fix this issue? I was really looking forward to using this library in our production pipeline, but I can't remove Vite unfortunately and local hacks/fixes are a no go either. |
I managed to get it work in ViteJS. I found out that the main problem is that they pointed out "module": "lib/bundle-esm.js" when it should actually be "module": "lib/bundle.esm.js". (the path is incorrect). To get it working:
|
This hack works for me, instead of |
Describe the bug
Danfojs cannot be loaded in a Vitejs project.
To Reproduce
Steps to reproduce the behavior:
import * as dfd from 'danfojs'
Expected behavior
The import works and you can use danfojs in your Vitejs app
Repro
You can see a repro in CodeSandbox here. Creating a new Vitejs application locally leads to the same issue (meaning that it's not an issue with CodeSandbox), and the issue happens regardless of whether you use TypeScript or JavaScript.
The text was updated successfully, but these errors were encountered: