Skip to content
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

Fresh NX + RSPack + React + Tailwind doesn't run serve #30065

Open
1 of 4 tasks
kobayuri opened this issue Feb 17, 2025 · 1 comment
Open
1 of 4 tasks

Fresh NX + RSPack + React + Tailwind doesn't run serve #30065

kobayuri opened this issue Feb 17, 2025 · 1 comment

Comments

@kobayuri
Copy link

Current Behavior

Serve should work properly in a new NX workspace

Expected Behavior

Serve doesn't work

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace (with configurations below)
  2. RUST_BACKTRACE=full npx nx run testwithtailwind:serve --verbose --skip-nx-cache

❯ npx create-nx-workspace
NX Let's create a new workspace [https://nx.dev/getting-started/intro]

✔ Where would you like to create your workspace? · testwithtailwind
✔ Which stack do you want to use? · react
✔ What framework would you like to use? · none
✔ Integrated monorepo, or standalone project? · integrated
✔ Application name · testwithtailwind
✔ Which bundler would you like to use? · rspack
✔ Test runner to use for end to end (E2E) tests · none
✔ Default stylesheet format · tailwind
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip

NX Creating your v20.4.4 workspace.

✔ Installing dependencies with npm
✔ Successfully created the workspace: testwithtailwind.

Nx Report

Node           : 22.14.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.9.2

nx                     : 20.4.4
@nx/js                 : 20.4.4
@nx/jest               : 20.4.4
@nx/eslint             : 20.4.4
@nx/workspace          : 20.4.4
@nx/devkit             : 20.4.4
@nx/eslint-plugin      : 20.4.4
@nx/module-federation  : 20.4.4
@nx/react              : 20.4.4
@nx/rspack             : 20.4.4
@nx/web                : 20.4.4
typescript             : 5.7.3
---------------------------------------
Registered Plugins:
@nx/rspack/plugin
@nx/eslint/plugin
@nx/jest/plugin

Failure Logs

❯ RUST_BACKTRACE=full npx nx run testwithtailwind:serve --verbose --skip-nx-cache

> nx run testwithtailwind:serve

> rspack serve --node-env=development

●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (31%) building /Users/yuri.kobashigawa/Projects/testwithtailwind/node_modules/source-map-loader/dist/cjs.js!/Users/yuri.kobashigawa/Projects/testwithtailwind/node_modules/webpack-dev-server/client/utils/stripAnsi.js                            
●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (31%) building /Users/yuri.kobashigawa/Projects/testwithtailwind/node_modules/source-map-loader/dist/cjs.js!/Users/yuri.kobashigawa/Projects/testwithtailwind/node_modules/webpack-dev-server/client/utils/stripAnsi.js                            <i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:4200/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.148:4200/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:4200/
<i> [webpack-dev-server] Content not from webpack is served from '/Users/yuri.kobashigawa/Projects/testwithtailwind/apps/testwithtailwind/public' directory
●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit                                                                                                                                                                                                                         
●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (100%) emitting after emit                                                                                                                                                                                                                         Entrypoint main [big] 1.37 MiB = main.js 1.36 MiB main.css 11.5 KiB
chunk (runtime: main) main.css, main.js (main) 11.4 KiB (css/mini-extract) 1.3 MiB (javascript) 30.7 KiB (runtime) [entry] [rendered]
●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (8%) setup compilation                                                                                                                                                                                                                             
●  ━━━━━━━━━━━━━━━━━━━━━━━━━ (0%) emitting after emit                                                                                                                                                                                                                           Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  should have module
Location: crates/rspack_core/src/compiler/module_executor/execute.rs:81

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1: _napi_register_module_v1
    at <unknown source file>
 2: _napi_register_module_v1
    at <unknown source file>
 3: _napi_register_module_v1
    at <unknown source file>
 4: _napi_register_module_v1
    at <unknown source file>
 5: _wasmer_vm_f64_nearest
    at <unknown source file>
 6: _wasmer_vm_f64_nearest
    at <unknown source file>
 7: _napi_register_module_v1
    at <unknown source file>
 8: _napi_register_module_v1
    at <unknown source file>
 9: _napi_register_module_v1
    at <unknown source file>
10: _napi_register_module_v1
    at <unknown source file>
11: _napi_register_module_v1
    at <unknown source file>
12: _napi_register_module_v1
    at <unknown source file>
13: _napi_register_module_v1
    at <unknown source file>
14: __pthread_deallocate
    at <unknown source file>

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Seems related to Tailwind as when I comment it in postcss.config.js, the issue gracefully disappear

Image
@danduh
Copy link

danduh commented Feb 19, 2025

Have the same issue.

Setting in package.json "@rspack/core": "1.2.2", solves this.
Starting from 1.2.3 -> 1.2.5 leads to the same error.
So I think this bug is on rspack side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants