Giter VIP home page Giter VIP logo

Comments (9)

JSerFeng avatar JSerFeng commented on July 25, 2024

Can you try to create a minimum repro repo

from rspack.

mrceperka avatar mrceperka commented on July 25, 2024

@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.

colinaaa avatar colinaaa commented on July 25, 2024

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.

JSerFeng avatar JSerFeng commented on July 25, 2024

try 1.0.0-alpha.2

from rspack.

mrceperka avatar mrceperka commented on July 25, 2024

@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.

JSerFeng avatar JSerFeng commented on July 25, 2024

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.

mrceperka avatar mrceperka commented on July 25, 2024

@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.

JSerFeng avatar JSerFeng commented on July 25, 2024

I think it's because some dependencies are unexpectedly hoist, can you try using pnpm

from rspack.

mrceperka avatar mrceperka commented on July 25, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.