danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Fix/594 exports

Open ekynoxe opened this issue 2 years ago • 3 comments

fixes #594 (and maybe also #545 and #527)

For a new vite app, a new CRA app and a new Vuew app, I've linked the package locally with npm link danfojs, then used the following code in the root file:

import * as dfd from 'danfojs'
const s = new dfd.Series([1, 3, 5, undefined, 6, 8])
s.print()

Both apps run fine without runtime errors and display the series in the console.

Screenshot 2023-10-05 at 12 55 36 Screenshot 2023-10-05 at 12 55 18 Screenshot 2023-10-09 at 09 31 54

However, types don't work, and I get the following error in CRA terminal output:

WARNING in ../danfojs/src/danfojs-browser/lib/bundle.esm.js 9:47-54
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

WARNING in ../danfojs/src/danfojs-browser/lib/bundle.esm.js 12:44-51
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

I'm also new to package exports, so it's all a little blurry, but hopefully that's a start to fix the issues and could do with some help to finish it off.

ekynoxe avatar Oct 05 '23 11:10 ekynoxe

This fix makes the package run on Vite. Pls merge this fix.

adarshmadrecha avatar Jan 02 '24 06:01 adarshmadrecha

@risenW @steveoni Any plans for merging this fix?

EsbenCN avatar Jan 30 '24 11:01 EsbenCN

I hit this today attempting to try out danfojs for the first time. Any plans to merge in the fix?

lschierer avatar May 07 '24 20:05 lschierer