Are you sure it's correct import here?
I solved the issue by changing it from
to just
URL: URL;
Updating @types/node
to newest version fixed this for me
I changed the URL: url.URL;
to URL: url.Url;
.
and solved.
Actually all you need to do is include @type/node
to tsconfig compilerOptions
```json
{
"compilerOptions": {
"types": [
"node"
]
}
}
Most helpful comment
Updating
@types/node
to newest version fixed this for me