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
TypeError: childCompilation.errors.map is not a function #1846
Comments
robert-irelan-tiktokusds
added a commit
to robert-irelan-tiktokusds/html-webpack-plugin
that referenced
this issue
Apr 12, 2024
I am fine with fix, but will be great to open an issue in rspack too |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behaviour 💣
When I attempt to build my project, I find the following error:
Looking at the code, it appears that the code expects
childCompilation.errors
to be an array, but it is actually an iterator, which doesn't (yet) have amap
method.Expected behaviour ☀️
If I make the minimal change to get this working - changing
childCompilation.errors.map
toArray.from(childCompilation.errors).map
- I get the compiler error I was expecting:Reproduction Example 👾
I don't know how to easily reproduce this in a public fashion, because I have a Typescript project. The underlying reason for the error is that I set an entry in the
compilerOptions.paths.[path]
of tsconfig.json to be a string rather than an array of strings. See the following:The error entry is
"@project/*": "./src/*"
. Changing that to"@project/*": ["./src/*"]
fixes the compilation error.Environment 🖥
The text was updated successfully, but these errors were encountered: