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: punycode not supported resolving ES modules #119

Open
MrJadaml opened this issue Mar 2, 2025 · 0 comments
Open

Bug: punycode not supported resolving ES modules #119

MrJadaml opened this issue Mar 2, 2025 · 0 comments

Comments

@MrJadaml
Copy link

MrJadaml commented Mar 2, 2025

Summary

When running storybook (Vite config) with "@storybook/experimental-addon-test": "^8.6.3", I'm unable to run the tests without it failing due to punycode error. I have three dependencies that use it, but the node-stdlib-browser/ dep that shows up in the error only exists within vite-plugin-node-polyfills dep:

➜  app git:(poc-176) ✗ npm ls punycode
[email protected] /Users/foo/code/app
├─┬ [email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   ├─┬ [email protected]
│   │ └─┬ [email protected]
│   │   └─┬ [email protected]
│   │     └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected]
│   └─┬ [email protected]
│     └─┬ [email protected]
│       └── [email protected]
└─┬ [email protected]
  └─┬ [email protected]
    ├── [email protected]
    └─┬ [email protected]
      └── [email protected] deduped
3:45:14 PM [vite] (client) ✨ new dependencies optimized: vite-plugin-node-polyfills/shims/buffer, vite-plugin-node-polyfills/shims/global, vite-plugin-node-polyfills/shims/process
3:45:14 PM [vite] (client) ✨ optimized dependencies changed. reloading
storybook/test: Unhandled rejection
storybook/test: Error: Directory import '/Users/foo/code/app/node_modules/punycode/' is not supported resolving ES modules imported from /Users/foo/code/app/node_modules/node-stdlib-browser/esm/proxy/url.js
Did you mean to import "punycode/punycode.js"?
/Users/foo/code/app/node_modules/storybook/bin/index.cjs:23
  throw error;
  ^

Error: Unhandled rejection
Error: Directory import '/Users/foo/code/app/node_modules/punycode/' is not supported resolving ES modules imported from /Users/foo/code/app/node_modules/node-stdlib-browser/esm/proxy/url.js
Did you mean to import "punycode/punycode.js"?
    at ChildProcess.<anonymous> (/Users/foo/code/app/node_modules/@storybook/experimental-addon-test/dist/preset.js:32:5088)
    at ChildProcess.emit (node:events:518:28)
    at emit (node:internal/child_process:949:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:91:21)

Node.js v22.14.0 (LTS)

deprecation of punycode in node
https://nodejs.org/api/punycode.html#punycode_punycode

@MrJadaml MrJadaml changed the title Bug: Bug: punycode not supported resolving ES modules Mar 4, 2025
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

1 participant