Issue
After migrating my angular application from 12 to 13, whenever I am running the app, and if I refresh the page or make a network call, I am getting the below error in the node terminal.
My current node version is 16.16.0 (previously it was 14.17.1)
I am also using ngrx, which also I migrated to v13
Has anyone faced a similar issue, and is there any solution to this?
Thanks
Solution
Had same problem after migrating angular 12 to 13, just figured out what was in my case, and looking at the exception it seems that in your case also. In proxy.conf.js I had 25 paths and will create a proxy instance for every "path". There is an explanation on how to configure proxy config for webpack https://webpack.js.org/configuration/dev-server/#devserverproxy.
In order to see if the problem is in proxy.conf.js I added a line like below, so I have 25 paths, set EventEmitter.defaultMaxListeners to 30 and error is not occurring anymore
Added at the beginning of proxy.conf.js
require('events').EventEmitter.defaultMaxListeners = 30;
Answered By - Victor

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.