-
-
Notifications
You must be signed in to change notification settings - Fork 553
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]: Crashes after saving a file in watch mode #8109
Comments
packages/rspack/src/Compilation.ts There is no implemented 'set' method for errors. Is it intended to be immutable? |
Based on the current implementation, it seems that setters can be supported. I will give it a try. |
It is not recommended to set |
I understand, but that's how it's written in ts-loader, and it's not convenient to modify. |
System Info
System:
OS: macOS 15.0
CPU: (10) arm64 Apple M1 Max
Memory: 1.36 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v20.10.0/bin/yarn
npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
pnpm: 8.12.0 - ~/.nvm/versions/node/v20.10.0/bin/pnpm
bun: 1.1.0 - ~/.bun/bin/bun
Browsers:
Chrome: 129.0.6668.100
Edge: 112.0.1722.68
Safari: 18.0
npmPackages:
@rspack/cli: ^1.0.10 => 1.0.10
@rspack/core: ^1.0.10 => 1.0.10
Details
Rspack compiled successfully in 715 ms
[rspack-cli] [Error: × TypeError: Cannot set property errors of #<Compilation> which has only a getter
│ at removeCompilationTSLoaderErrors (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/ts-loader/dist/after-compile.js:274:24)
│ at /Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/ts-loader/dist/after-compile.js:29:9
│ at Object.fn (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/ts-loader/dist/instances.js:206:13)
│ at next (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/lite-tapable/dist/index.js:523:25)
│ at AsyncSeriesHook.callAsyncStageRange (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/lite-tapable/dist/index.js:543:9)
│ at /Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/lite-tapable/dist/index.js:86:18
│ at new Promise ()
│ at AsyncSeriesHook.promiseStageRange (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/lite-tapable/dist/index.js:85:16)
│ at QueriedHook.promise (/Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/lite-tapable/dist/index.js:224:26)
│ at /Users/mbear/bearspace/test-sourcemap/packages/main/node_modules/@rspack/core/dist/Compiler.js:676:320
│
] {
code: 'GenericFailure'
}
In watch mode, an error occurs when modifying any file
Reproduce link
No response
Reproduce Steps
git clone https://github.com/MBearo/issue-rspack-sourcemap-error/tree/ts-loader-watch-error
npm i
npm run watch:rs
modify any file
The text was updated successfully, but these errors were encountered: