-
Notifications
You must be signed in to change notification settings - Fork 12k
App broken after 12.0.0-next.9 - MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead #20544
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
Comments
The The second aspect regarding the server build appears to be Webpack 5 related but will require addition investigation. |
@alan-agius4 you can reproduce the issue in |
@clydin should I add you to the private repo? |
The I tried to reproduce this in your project but I wasn't able, with either of the below commands
Likely this is caused by incorrect module resolution, can you try the below and see if the problem persists.
|
Thats strange, I removed |
Which npm version are you using? Can you run |
npm version : Output of |
Have you tried running the project in Visual Studio? If so, when you run the project you will see the homepage is rendered, but if you open the Chrome Dev Console you will notice the errors and realize that app is broken. Also update the Angular CLI |
I removed the I dont know why is it looking for modules in
And some times this error:
Edit
|
As an experiment, can you try adding a |
Webpack 5 uses a new deterministic identifier algorithm. The concept being that it will limit cache misses by increasing the probability of preserving the file names. |
I see, btw this upgrade reduced size of my js bundles as well: Browser Bundles: 3.33Mb > 3.28Mb Server Bundles : 4.67Mb > 3.89Mb |
Few more things to bring in your notice, after update:
|
@naveedahmed1, can you please try out the latest RC version? |
I had a similar problem, I deleted NG11 latest
NG12 RC
|
@alan-agius4 I can confirm although |
Closing as this issue should be solved. If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 12.0.0-next.8.After upgrading to 12.0.0-next.9, the client app and server (ssr) app throws below error.
MainTemplate.hooks.hashForChunk is deprecated (use JavascriptModulesPlugin.getCompilationHooks().chunkHash instead
Although despite of this the
ng serve
command forclient
application does work, butSSR
applications is broken.The server application throws below error in Chrome Dev Console and is broken:
And
🔬 Minimal Reproduction
Here's my
package.json
runningnpm run build
should produce the above error. I can also add you to a private repo for more information.Below is my
index.html
🔥 Exception or Error
🌍 Your Environment
The text was updated successfully, but these errors were encountered: