Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a PR made by @Shirllyuan internally, but havn't tested on win devices.
After running "yarn workspace rath-client start", the above error occurs.
solutions
Determined to be a web worker loading issue, the current webpack version is:
According to the official documentation, in webpack 5, another method has replaced the worker-loader loading method, which caused this problem.
![image](https://private-user-images.githubusercontent.com/22167673/251318986-94f4862e-2dc4-46ad-8d79-7e6602399f46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTMyOTYsIm5iZiI6MTczOTI1Mjk5NiwicGF0aCI6Ii8yMjE2NzY3My8yNTEzMTg5ODYtOTRmNDg2MmUtMmRjNC00NmFkLThkNzktN2U2NjAyMzk5ZjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA1NDk1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkMjg3OGE1NzkzN2YzNWY1MWQ2M2RkMDJjM2I0YjcwYzE5ZjcxMDI4YjBiNTY2ZGI3ZDgyYWU1MjE1MmZiMWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Z_Lj9Iy22JZU-Q0GBJAEeo3wBTpvVXPw9lR5WCJXU8w)
The main modification method is as follows:
Change the current worker loading method, as shown in the following image:
changed to
config of worker loader can be deleted:
![image](https://private-user-images.githubusercontent.com/22167673/251319055-a02b4494-1336-4da2-beae-7f5629b5b218.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTMyOTYsIm5iZiI6MTczOTI1Mjk5NiwicGF0aCI6Ii8yMjE2NzY3My8yNTEzMTkwNTUtYTAyYjQ0OTQtMTMzNi00ZGEyLWJlYWUtN2Y1NjI5YjViMjE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDA1NDk1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiNzY2ZTIxNjAzMmE1N2RkZWYwYmM5NmI1ZWYxNDNkZGFjYWIxNDVlNDQ2N2RkMGYzMzFlM2MzN2I4Mzk0ZTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.qOYTZuin_rD-7jZW1zKHqOPwJ113occPK7VUls9hEGc)