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

[Bug]: ERROR in × Module not found: Can't resolve './src/main.tsx' in #8446

Closed
hasnum-stack opened this issue Nov 15, 2024 · 4 comments
Closed
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@hasnum-stack
Copy link

System Info

System:
OS: Linux 3.10 CentOS Linux 7 (Core)
CPU: (16) x64 Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz
Memory: 7.36 GB / 23.37 GB
Container: Yes
Shell: 4.2.46 - /bin/bash
Binaries:
Node: 16.16.0 - /opt/node-v16.16.0/bin/node
npm: 8.11.0 - /opt/node-v16.16.0/bin/npm
pnpm: 9.13.0 - /home/jenkins/.local/share/pnpm/pnpm
npmPackages:
@rspack/cli: ^1.1.1 => 1.1.1
@rspack/core: ^1.1.1 => 1.1.1
@rspack/plugin-react-refresh: 1.0.0 => 1.0.0

Details

ERROR in × Module not found: Can't resolve './src/main.tsx' in '/data1/jenkins_dir/testrsbuild/123123'

Reproduce link

No response

Reproduce Steps

pnpm create rspack@latest
pnpm i
pnpm build

@hasnum-stack hasnum-stack added bug Something isn't working pending triage The issue/PR is currently untouched. labels Nov 15, 2024
@hasnum-stack
Copy link
Author

感觉是centos 7的问题 ...

@theninthsky
Copy link

theninthsky commented Nov 15, 2024

Same issue on Cloudflare Pages with rspack v1.1.1:

10:38:51.399 | > rspack build --mode production
-- | --
10:38:51.400 |  
10:38:52.276 | ERROR in × Module not found: Can't resolve './src' in '/opt/buildhome/repo'
10:38:52.277 | help: Found module './src/index.tsx'. However, it's not possible to request this module without the extension
10:38:52.277 | if its extension was not listed in the `resolve.extensions`. Here're some possible solutions:
10:38:52.278 |  
10:38:52.278 | 1. add the extension `".tsx"` to `resolve.extensions` in your rspack configuration
10:38:52.278 | 2. use './src/index.tsx' instead of './src'
10:38:52.278 |  
10:38:52.279 | Rspack compiled with 1 error in 158 ms
10:38:52.307 | Failed: Error while executing user command. Exited with error code: 1
10:38:52.316 | Failed: build command exited with code: 1
10:38:53.047 | Failed: error occurred while running build command

A regression from v1.1.0.

Also, cannot reproduce on Windows 11.

theninthsky added a commit to theninthsky/client-side-rendering that referenced this issue Nov 15, 2024
@Gijsdeman
Copy link

Likely similar to #8433. Seems to be an issue with bindings on different platforms, hence why cannot be reproduced on all systems.

@chenjiahan
Copy link
Member

Fixed in Rspack v1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

No branches or pull requests

4 participants