Skip to content
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

Browser is trying to require fs/promises #318

Closed
dav-is opened this issue Jun 14, 2023 · 3 comments
Closed

Browser is trying to require fs/promises #318

dav-is opened this issue Jun 14, 2023 · 3 comments

Comments

@dav-is
Copy link

dav-is commented Jun 14, 2023

The browser is trying to require fs/promises in Next.js, failing to compile when using 10.1.0. Rolling back to 10.0.1 seems to fix it.

In 10.0.1, this library uses fs:

import fs from "fs";

In 10.1.0, this library uses fs/promises:

import fs from "fs/promises";

In package.json, fs is marked in browser as false:

"browser": {
"fs": false
},

I think fs/promises should be included in there instead.

@ballcoach12
Copy link

I am getting the same error. Is there a workaround?

@dav-is
Copy link
Author

dav-is commented Aug 5, 2023

I am getting the same error. Is there a workaround?

I had to downgrade to 10.0.1 and I don't use the fs resolver

@jonluca
Copy link
Collaborator

jonluca commented Mar 5, 2024

This is fixed in v11+

@jonluca jonluca closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants