vite-plugin-node-polyfills icon indicating copy to clipboard operation
vite-plugin-node-polyfills copied to clipboard

Bug: Errors after upgrade to 0.24 `load url unenv/node/process`

Open Stanzilla opened this issue 5 months ago • 7 comments

Summary

After upgrading from 0.23.0 to 0.24.0 our Storybook CI started failing with the following errors:

Cannot find package 'unenv/node/process' imported from '/builds/x/technology/x/frontend/node_modules/@storybook/addon-vitest/dist/vitest-plugin/global-setup.mjs

2025-07-18T11:40:47.137036Z 01O [31m[1mCaused by: Error[22m: Failed to load url unenv/node/process (resolved id: unenv/node/process). Does the file exist?[39m
2025-07-18T11:40:47.137037Z 01O [90m [2m❯[22m loadAndTransform ../../node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:[2m35725:17[22m[39m
2025-07-18T11:40:47.137037Z 01O 
2025-07-18T11:40:47.137038Z 01O [31m[2m⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[22m[39m
2025-07-18T11:40:47.137039Z 01O [31m[1mSerialized Error:[22m[39m [90m{ code: 'ERR_LOAD_URL' }[39m

is this a package conflict or an actual bug?

Stanzilla avatar Jul 18 '25 14:07 Stanzilla

I'm also having this issue.

Error: Failed to scan for dependencies from entries:
/Users/.../libraries/react-library/index.html

✘ [ERROR] Cannot find module 'unenv/mock/empty' from '.' [plugin node-stdlib-browser-alias]

littlestbrother avatar Jul 22 '25 18:07 littlestbrother

I'm also having this issue.

Error: Failed to scan for dependencies from entries:
/Users/.../libraries/react-library/index.html

✘ [ERROR] Cannot find module 'unenv/mock/empty' from '.' [plugin node-stdlib-browser-alias]

I'm having the exact same issue.

fxmanu avatar Jul 24 '25 14:07 fxmanu

@miguel-nascimento @sapphi-red any ideas?

Stanzilla avatar Jul 28 '25 22:07 Stanzilla

My change only changes the behavior when it's used with rolldown-vite, so I don't think it's directly caused by the update of this package.

sapphi-red avatar Jul 29 '25 03:07 sapphi-red

@miguel-nascimento then?

Stanzilla avatar Aug 21 '25 17:08 Stanzilla

@sapphi-red any chance you could look into fixing it regardless? Seems like you're the most active here

Stanzilla avatar Sep 26 '25 08:09 Stanzilla

I need a minimal reproduction that works with 0.23.0 and doesn't with 0.24.0 for investigation.

sapphi-red avatar Sep 26 '25 14:09 sapphi-red