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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: polyfillNode broken on Windows due to rollup-plugin-polyfill-node #3545

Closed
1 task done
rossng opened this issue Jul 6, 2021 · 2 comments 路 Fixed by #3606
Closed
1 task done

馃悰 BUG: polyfillNode broken on Windows due to rollup-plugin-polyfill-node #3545

rossng opened this issue Jul 6, 2021 · 2 comments 路 Fixed by #3606

Comments

@rossng
Copy link

rossng commented Jul 6, 2021

Quick checklist

  • I am using the latest version of Snowpack and all plugins.

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the bug

During the esbuild optimize step on Windows, it throws errors like:

error: Could not resolve "./common/_polyfill-node:util-cead3761.js"

This is because the filename contains a : character, which is invalid on Windows. It seems that these filenames are generated by rollup-plugin-polyfill-node, which is used by esinstall to generate the polyfills earlier on in the Snowpack build. Instead, it creates a 0-byte file called _polyfill-node which has some NTFS alternate data streams:

[...]\_snowpack\pkg\common\_polyfill-node:
   :util-cead3761.js:$DATA      69423
   :util-cead3761.js.map:$DATA  2695

There has been a PR to fix this waiting for a month. There's also another PR that fixes a different Windows issue that I haven't encountered yet. It would be good to get these merged and released in Snowpack.

It looks like it's responsible for this issue: NfNitLoop/feoblog#16 and likely breaks most Snowpack builds on Windows.

Link to minimal reproducible example (optional)

No response

@NfNitLoop
Copy link

Related bug in Snowpack: #2752

@leruaa
Copy link

leruaa commented Nov 10, 2021

Unfortunatelly this issue is not resolved in snowpack 3.8.8 because the esinstall version has not been updated in PR #3606 and as a result the fix hasn't been deployed.

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

Successfully merging a pull request may close this issue.

3 participants