angular 18 build isuue with eventResource
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
when we build angular 18 it is complaining about the eventSource module which being used by signalR: node_modules/eventsource/lib/eventsource.js:1:20: 1 │ var parse = require('url').parse; The package "url" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. node_modules/eventsource/lib/eventsource.js:3:20: 3 │ var https = require('https')
Expected Behavior
it should build without complaining about it. my tsconfig having this
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8
Anything else?
my tsconfig having this "moduleResolution": "node", "importHelpers": true, "lib": ["ES2023", "DOM"], "target": "ES2022", "module": "ES2022",
fixed by changing "moduleResolution": "node", to "moduleResolution": "bundler",
Facing same issue in angular 19, moduleResolution: "bundler", does not resolve errors in my case