Closed f0reclone closed 6 months ago
same issue +1
I use unplugin
to create a rspack plugin
The error occurs on using it.
Hello @f0reclone, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction
will be closed if no activities in 14 days.
check whether @rspack/binding and @rspack/core are same version in your node_modules
check whether @rspack/binding and @rspack/core are same version in your node_modules
--node_modules --playground --node_modules --rspack-project
the first node_modules contains @rspack/core and binding, both version is 0.4.2 the inner node_modules(beside rspack-project) also contains @rspack/core and binding, both version is 0.4.0 I delete the inner node_modules/@rspack/core(binding), rspack works well.
I am not sure why there are two node_modules. (I am using npm workspace).
"workspaces": [
".",
"playground/*"
],
seems your issue is resolved
seems your issue is resolved
What? I had to manually delete the problem to get rid of it, at least I think rspack's case support for monorepo is problematic.
I think this is related to bun.
Steps to reproduce:
Install bun:
curl -fsSL https://bun.sh/install | bash
clone rspack repro
git clone git@github.com:web-infra-dev/rspack-repro.git
cd rspack-dist
Run bun run dev:rspack
Working example:
@f0reclone I can't reproduce following your step, you can commit the node_modules so we can investigate
@lovetingyuan please provide repro
System Info
System: OS: macOS 13.3.1 CPU: (10) arm64 Apple M1 Pro Memory: 57.95 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm pnpm: 8.6.5 - ~/.nvm/versions/node/v18.13.0/bin/pnpm Browsers: Brave Browser: 106.1.44.101 Chrome: 120.0.6099.71 Edge: 120.0.2210.61 Safari: 16.4 npmPackages: @rspack/cli: 0.4.1 => 0.4.1 @rspack/core: 0.4.1 => 0.4.1
Details
For some reason it works only again if the node_modules folder is deleted and then reverted to 0.4.0. Using bun 1.0.15 as a package manager.
Reproduce link
No response
Reproduce Steps