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

v5.78.0 causing errors on watcher recompilations #17417

Closed
thecontstruct opened this issue Jun 22, 2023 · 4 comments
Closed

v5.78.0 causing errors on watcher recompilations #17417

thecontstruct opened this issue Jun 22, 2023 · 4 comments
Labels

Comments

@thecontstruct
Copy link

Bug report

Looks like PR 16477 introduced a regression for us while running in watch mode for recompilations. Specifically the addition of the if stmt in NormalModuleFactory.js.

What is the current behavior?
The initial build reports no errors but anytime it re-compiles due to a file change, the errors show up. They're all asset related errors and it doesn't seem break the build as far as I can tell. The assets in question are mostly css images but it's also occurring for a json file we're importing in our js code. That initially made me thing it was css-loader related but the json file error throws a wrench in that theory.

The one common feature is that both sets of assets are requested with alias paths but the error messages report the absolute path.

ERROR in ./docs/assets/definitions/default.json 2:11
Module parse failed: Unexpected token (2:11)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| {
>   "default": {
|     "desktop": [
|       {

It's an unexpected error considering importing json files in JS should just work, and does on the initial compilation.

If the current behavior is a bug, please provide the steps to reproduce.
I haven't had time to create a simplified reproduction since our setup is pretty complex but I figured I'd at least report something in case someone else has encountered this before or it sparks an ah-ha moment. If that's ultimately what's needed me or my colleague will try to get something together.

What is the expected behavior?

If the loader for the resources were truly missing, then I'd expect to to affect all assets and it's only affecting some of them.

Other relevant information:
webpack version: 5.78.0
Node.js version: v20.3.0
Operating System: OSX 13.3.1
Additional tools:

@TheLarkInn
Copy link
Member

Does this still persist in the latest version of webpack.

@thecontstruct
Copy link
Author

Yes it does. If there's anything in particular you want me to look into or get logs on, I'm more than happy to do that.

@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

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

No branches or pull requests

3 participants