Closed MichailShcherbakov closed 10 months ago
I've got the same error
I decided to try another version, and ^0.7.0 works just fine for me
@manylovv Unfortunately, I can't use 0.7.0 version in my project. I need "exclude" functionality.
It looks like the error is in "buffer-polyfill"
in the package.json
. Yarn possibly does not support it.
I don't know why the `shim.js' file is used here
const globalShimsPath = require.resolve('vite-plugin-node-polyfills/shims')
instead of using the helpers/esbuild/shim.js
file from node-stdlib-browser
const globalShimsPath = require.resolve('node-stdlib-browser/helpers/esbuild/shim')
and for what this one
included[name] = globals.includes(name) ? globalShimsPath : value
I just changed all of it. And it works fine for me.
I've started looking into this, but I'm having trouble reproducing it locally.
@davidmyersdev I've attached a link to an example project. The error is reproduced when building or running project after yarn install
.
Same here
I think I see what's happening now. It appears that Yarn v1 does not handle the aliased process
dependency as it should, so it just skips it rather than unpack it into node_modules
. I'll have to figure out how I want to handle this, but it shouldn't be too bad to get a fix together. To answer your earlier question, the replacement shims file is necessary because node-stdlib-browser
has an out-of-date buffer
dependency.
There also appears to be an open issue about this bug without any responses. https://github.com/yarnpkg/yarn/issues/6907
This is fixed in v0.11.3
.
Thank you @davidmyersdev
Hi @davidmyersdev.
When I run
yarn
I get a waringAnd when I try to build a lib
vite
throws an errorLink to Codesandbox
Can you help me to fix it?
Thank you!