-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
Uncaught ReferenceError: require is not defined after upgrading to 0.5 #5546
Comments
Can you try this version |
I gave it a go but it's still failing with the same error in that repro repo |
Same problem. Is there some solution to avoid this error. |
There is a solution. Set
|
@glenjamin @Yukiniro hello, i've tried |
Hey, I've tried |
thank you. #5520 fixes this issue and is included in 0.5.4. i'll close this issue then. please feel free to ask if there's any further question about the problem. |
System Info
System:
OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (3) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 1.25 GB / 5.79 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 18.8.0 - /usr/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 8.18.0 - /usr/bin/npm
Browsers:
Chrome: 117.0.5938.132
npmPackages:
@rspack/cli: ^0.5.3 => 0.5.3
@rspack/core: ^0.5.3 => 0.5.3
Details
After upgrading to 0.5, my JS fails to load with the error
I've traced this down to the
localforage
package, this line in particualr: https://github.com/localForage/localForage/blob/1.7.3/dist/localforage.js#L7It appears to be doing a sort of universal module definition wrapper. This works fine on webpack v5 and rspack 0.4
It likely that I'll find some workaround for this, but I wanted to report it since it's still an incompatibility
Reproduce link
https://github.com/glenjamin/rspack-localforage-repro
Reproduce Steps
npm run build
The text was updated successfully, but these errors were encountered: