-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
Hi again 👋
Just got around to updating to 2.0.1, but now I'm getting errors like the following:
Error: Cannot find module 'node_modules/lib-r-math.js/dist/esm/lib/distributions/binomial/dbinom' imported from node_modules/lib-r-math.js/dist/esm/lib/distributions/binomial/index.mjs
The issue seems to stem from the lack of a .mjs extension on the import/re-export statements in the compiled esm code, e.g.:
// node_modules/lib-r-math.js/dist/esm/lib/distributions/binomial/index.mjs
export {
dbinom
} from './dbinom';
export {
pbinom
} from './pbinom';
export {
qbinom
} from './qbinom';
import { rbinomOne } from './rbinom.mjs';
import { repeatedCall64 } from '../../r-func.mjs';
export function rbinom(n, size, prob) {
return repeatedCall64(n, rbinomOne, size, prob);
}
export {
rbinomOne
};should be
// node_modules/lib-r-math.js/dist/esm/lib/distributions/binomial/index.mjs
export {
dbinom
} from './dbinom.mjs';
export {
pbinom
} from './pbinom.mjs';
export {
qbinom
} from './qbinom.mjs';
import { rbinomOne } from './rbinom.mjs';
import { repeatedCall64 } from '../../r-func.mjs';
export function rbinom(n, size, prob) {
return repeatedCall64(n, rbinomOne, size, prob);
}
export {
rbinomOne
};The same goes for the rest of the files in dist/esm/.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels