Comments (9)
Can you try to create a minimum repro repo
from rspack.
@JSerFeng I am not at the moment. I've tried with the repro repo but it was working as expected. But I haven't installed all the plugins and dependencies my original repo has.
Is there some command that could help you debug? I think I could run that in private repo and give you output.
from rspack.
Same issue here. I can provide an internal repro. It works when using Rspack 1.0.0-alpha.0
but does not work when using Rspack 1.0.0-alpha.1
.
from rspack.
try 1.0.0-alpha.2
from rspack.
@JSerFeng it won't even start now :(
NODE_ENV=development HMR=1 rspack dev -c webpack/rspack.app.config.js
/var/docker/frontend_v2/node_modules/cliui/build/index.cjs:291
const stringWidth = require('string-width');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /var/docker/frontend_v2/node_modules/string-width/index.js from /var/docker/frontend_v2/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in /var/docker/frontend_v2/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/yargs/build/index.cjs:1:60039)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/yargs/index.cjs:5:30)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/dist/cli.js:35:33)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/dist/bootstrap.js:4:15)
at Object.<anonymous> (/var/docker/frontend_v2/node_modules/@rspack/cli/bin/rspack:2:16) {
code: 'ERR_REQUIRE_ESM'
Same problem for alpha.1 as well. Only alpha.0 works for me right now.
from rspack.
Error [ERR_REQUIRE_ESM]: require() of ES Module
This is not issue with rspack, can you solve it and then continue trying 1.0.0-alpha.2
from rspack.
@JSerFeng maybe it's not directly, but why 1.0.0-alpha.0 works and 1.0.0-aplha.2 not? It looks like some rspack dependencies were updated and now the build is broken. When I downgrade to alpha.0 its able to run.
from rspack.
I think it's because some dependencies are unexpectedly hoist, can you try using pnpm
from rspack.
@JSerFeng thanks for the tip. Will try. I am using yarn v1 and it was working so far (I mean with alpha.0)
from rspack.
Related Issues (20)
- [Bug]: webpackMissingModule with relative import HOT 3
- [Bug]: 也更新后报错 HOT 1
- [Bug]: Some `output.copy` glob patterns fail HOT 1
- [Bug]: should have dependency id HOT 21
- [Bug]: plugin compiles fine in webpack, but does not work in rspack HOT 7
- [Feature]: Add chunks raised for imports in third-party npm packages, which need to be captured in ouput.chunkFilename HOT 2
- [Tracking]: JS -> TS refactor the remaining .js file to .ts and esm HOT 1
- [Bug]: HMR update not found HOT 5
- [Bug]: Panic occured at runtime. HOT 1
- [Bug Report]: css-loader errors occurred while using tailwindcss. HOT 2
- JavaScript parsing error: Expression expected HOT 2
- [Bug]: `webpack-test/statsCases/runtime-specific-used-exports` randomly panics
- [Bug]: module federation plugin makes dev/build/HMR a lot slower HOT 2
- [Bug]: Bad output with two `||` in an expression
- [Tracking]: Rsnext support
- [Feature]: Detect recursive import HOT 1
- [Bug]: Random error with CopyRspackPlugin HOT 1
- [Bug]: Rspack does not allow to set target based on browserlist entries
- [Bug]: The production environment page crashes and reports TypeError when the version is upgraded to 1.0.0-alpha.5
- [Bug]: rspack.CopyRspackPlugin modifies file content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspack.