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

warning Pattern ["buffer@^6.0.3"] is trying to unpack in the same destination #61

Closed
nflaig opened this issue Dec 8, 2023 · 2 comments · Fixed by #63
Closed

warning Pattern ["buffer@^6.0.3"] is trying to unpack in the same destination #61

nflaig opened this issue Dec 8, 2023 · 2 comments · Fixed by #63

Comments

@nflaig
Copy link
Contributor

nflaig commented Dec 8, 2023

Getting the following warning due to using this package

warning Pattern ["buffer@^6.0.3"] is trying to unpack in the same destination "/home/<user>/.cache/yarn/v6/npm-buffer-polyfill-6.0.3-2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6-integrity/node_modules/buffer-polyfill" as pattern ["buffer-polyfill@npm:buffer@^6.0.3"]. This could result in non-deterministic behavior, skipping.

likely related to

"buffer-polyfill": "npm:buffer@^6.0.3",

@nflaig
Copy link
Contributor Author

nflaig commented Dec 9, 2023

Did some digging into the history of this package, looks like there was a similar issue with process-polyfill

// We cannot use `process-polyfill` as the package name due to a bug in Yarn v1. The errors results in a dependency
// conflict with `node-stdlib-browser` which fails to import `process/browser.js`.
// https://github.com/yarnpkg/yarn/issues/6907
// eslint-disable-next-line unicorn/prefer-node-protocol
export { default as process } from 'process'

Although I don't know if there is an actual runtime issue due to the buffer warning.

Potential workaround to get rid of the warning is to add custom resolution to install to different versions of buffer package, the only updates in 6.0.3 are type related (feross/buffer#277) so I don't expect problems

"resolutions": {
    "buffer-polyfill": "npm:[email protected]"
  }

I am still curious, I haven't seen this before. Why is the renaming of the buffer package to buffer-polyfill required?

"dependencies": {
    "buffer-polyfill": "npm:buffer@^6.0.3",
  }

@nflaig
Copy link
Contributor Author

nflaig commented Dec 25, 2023

Thanks @davidmyersdev for addressing this so quickly. We have updated the plugin to latest version and all warnings are resolved 🎉

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.

1 participant