-
Notifications
You must be signed in to change notification settings - Fork 315
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
v4.2.0 throws a missing module error for fs
#715
Comments
This is also a breaking change for us (using webpack 5.94.0 via Laravel Mix) |
Can you provide a minimal example to reproduce this? Did it work in 4.1.0? From the changes between the two releases, I don't see a direct reason why it would now pick up the Node.js code ( |
@Acconut I reverted to This is the error that
|
I cannot reproduce this with Next.js. Created a new app with import * as tus from "tus-js-client";
export default function Home() {
return (
<div>Is supported: {tus.isSupported.toString()}</div>
)
} That works as expected without an error: Please provide more details to reproduce this. Or better, a complete, minimal example. |
@Murderlon is facing a similar problem in Uppy: https://github.com/transloadit/uppy/actions/runs/10810251568/job/29988888440 We'll undo the use of the |
v4.2.2 has been released and drops Even if it solves the problem, it raises the question why Webpack picks up Node.js-only files when building for a browser. Maybe it has always done this while polyfilling Node.js modules, but now it cannot polyfill with the |
We are also hit with this and unfortunately v4.2.2 doesn't fix it. repro - https://github.com/aaronforloop/tus-module-not-found |
@aaronforloop Thanks, I can reproduce it with your repository. I'll look into it. |
I might have found the problem and it's not visible by looking at the changes in this repository. Instead, the v4.2.0 release on NPM accidentally includes This PR is an attempt to move tus-js-client to TypeScript, but hasn't been merged, so its files shouldn't be in the release. For some reason unknown to me these files cause Webpack to fail. I just released v4.2.3 to NPM without these problematic, unintended files. Please test it and let me know if that fixes the problem. To prevent this issue in the future, I will improve the build script to clean unwanted files and also work on automating releases on CI versus doing them manually. Apologies for that. |
Thank you for the prompt fix! We've tested v4.2.3, and it resolves the issue on our end. Appreciate your efforts. |
Thanks for the assistance, without which it would have been a lot hard to debug this! I will close this new. Feel free to leave a comment if you are still struggling with this specific Webpack error. |
Describe the bug
missing module
fs
To Reproduce
Steps to reproduce the behavior:
npm run dev
Expected behavior
Not throw an error
Setup details
Setup is [email protected]
The text was updated successfully, but these errors were encountered: