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

[Bug]: storybook/@nextjs-experimental-vite ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package 'fs' #29409

Open
hsavit1 opened this issue Oct 19, 2024 · 2 comments

Comments

@hsavit1
Copy link

hsavit1 commented Oct 19, 2024

Describe the bug

I am trying to update my storybook setup in my next.js project to use the new experimental vite. using version 8.3.6 . I'm getting this error

../../node_modules/next/dist/compiled/gzip-size/index.js:1:2840:
  1 │ ...essFn(o,r):o}return n}},147:e=>{"use strict";e.exports=require("fs")},781:e=>{"use strict";e.exports=require("stream")},796:e=>{"...
    ╵                                                                   ~~~~

10:58:47 AM [vite] error while updating dependencies:
Error: Build failed with 1 error:
../../node_modules/vite/node_modules/esbuild/lib/main.js:1225:21: ERROR: [plugin: vite:dep-pre-bundle] Failed to resolve entry for package "fs". The package may have incorrect main/module/exports specified in its package.json.
at failureErrorWithLog (/Users/x/code/xx/xxx/xxxx/node_modules/vite/node_modules/esbuild/lib/main.js:1472:15)
at /Users/x/xx/xxx/xxxx/xxxxx/node_modules/vite/node_modules/esbuild/lib/main.js:945:25
at /Users/x/xx/xxx/xxxx/xxxxx/node_modules/vite/node_modules/esbuild/lib/main.js:1353:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction link

Reproduction steps

No response

System

[email protected]

Additional context

No response

@shilman
Copy link
Member

shilman commented Oct 20, 2024

Do you a have a reproduction repo you can share? If not, can you create one? Go to https://storybook.new or see repro docs. Thank you! 🙏

@valentinpalkovic
Copy link
Contributor

Which version of next do you use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants