-
-
Notifications
You must be signed in to change notification settings - Fork 447
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
quantile function of Beta distribution is broken on production build with Next.js #3011
Comments
👋 Hi there! 👋 And thank you for opening your first issue! We will get back to you shortly. 🏃 💨 |
@Planeshifter Any ideas here? |
Currently am unable to reproduce the issue in a Next.js app; similarly attached @bvdmitri Does the same happen when loading |
Hey @Planeshifter , thanks for checking! Yes, the issue also happens when I change the import statement to console.log(new beta.Beta(5,5).quantile(.5)) outputs However, I also tried Next.js 15.0 (still in beta afaiu) and the issue is not present there and everything works as expected. That makes me think that some configuration options have changed for the build process. Do you know what in principle can cause the mathematical operations to be malformed during bundling in js? I'm not an expert in js/ts bundlers build processes so this is as far as I can go. |
I suppose it could be possible that minification is reordering operations, but one would need to confirm by examining the bundled output. |
Here is the link to the reproducer https://github.com/bvdmitri/nextjs-stdlib-bug import { beta } from '@stdlib/stats-base-dists';
export default function Home() {
const result = new beta.Beta(5, 5).quantile(0.5);
return <div>{result}</div>;
} |
I also wanted to file this issue within Next.js repository, but since it is fixed on the next beta version its not considered as a bug. But updating our codebase to the latest unreleased beta of Next.js is somewhat disruptive, so any help here is appreciated. |
For other people who also encounter the same issue I was able to hot-fix it with the following option in
|
Description
I have an application written in Next.js and some code that uses
beta
distribution from'@stdlib/stats-base-dists/dist'
. I noticed that thequantile
function is completely broken while building the application in production mode (next build && next start
). For example the output in Chrome console:The quantile function works as expected if I run the application in the development mode (
next dev
)I'm not sure if this is the case with other distributions
Related Issues
Related issues # , # , and # .
Questions
No.
Demo
No response
Reproduction
Expected Results
No response
Actual Results
No response
Version
0.2.2
Environments
Chrome
Browser Version
129.0.6668.91
Node.js / npm Version
No response
Platform
MacOS
Checklist
The text was updated successfully, but these errors were encountered: