warning Pattern ["buffer@^6.0.3"] is trying to unpack in the same destination
nflaig opened this issue · 2 comments
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
vite-plugin-node-polyfills/package.json
Line 73 in bfb5290
Did some digging into the history of this package, looks like there was a similar issue with process-polyfill
vite-plugin-node-polyfills/shims/index.ts
Lines 5 to 9 in bfb5290
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:buffer@6.0.2"
}
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",
}
Thanks @davidmyersdev for addressing this so quickly. We have updated the plugin to latest version and all warnings are resolved 🎉