-
Notifications
You must be signed in to change notification settings - Fork 366
Description
I'm leaving this here so the next person doesn't have to spend as much time on this as I have...
After I updated to Angular 20, my project wouldn't compile anymore with the error "Cannot find namespace 'NodeJS'."
Edit: I found out I had a tsconfig.app.json setting "types": [] in the compilerOptions. I don't know why, when or how that got there and why the issue only showed itself after updating to Angular 20. I removed that line and it works (with Angular 21). So all of that below might not be relevant anymore.
With Angular 20 the moduleResolution in tsconfig was changed from "node" to "bundler".
A workaround is to include "skipLibCheck": true in the compilerOptions.
I found that workaround here: aws-amplify/amplify-ui#6592
Adding /// <reference types="node" /> at the top of esm/index.d.ts worked also.