stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.85k stars 153 forks source link

Error: The Angular Compiler requires TypeScript >=4.4.2 and <4.5.0 but 4.5.4 was found instead. #483

Closed ezielcabahug closed 2 years ago

ezielcabahug commented 2 years ago

Describe the bug

I got this error: ng serve ⠹ Generating browser application bundles (phase: setup)...(node:6) UnhandledPromiseRejectionWarning: Error: The Angular Compiler requires TypeScript >=4.4.2 and <4.5.0 but 4.5.4 was found instead. at checkVersion (file:///home/projects/angular-covnkk/node_modules/@angular/compiler-cli/bundles/index.js:17524:11) at verifySupportedTypeScriptVersion (file:///home/projects/angular-covnkk/node_modules/@angular/compiler-cli/bundles/index.js:17528:3) at new NgtscProgram (file:///home/projects/angular-covnkk/node_modules/@angular/compiler-cli/bundles/index.js:17678:7) at AngularWebpackPlugin.updateAotProgram (/home/projects/angular-covnkk/node_modules/@ngtools/webpack/src/ivy/plugin.js:321:32) at eval (/home/projects/angular-covnkk/node_modules/@ngtools/webpack/src/ivy/plugin.js:198:24) at Hook.eval [as call] (eval at _0x53a6f5 (https://angular-covnkk.w.staticblitz.com/blitz.c1a2f33ebdb80ec1573b6337c828d176e80f0398.js:11:220541), :20:1) at Hook.CALL_DELEGATE [as _call] (/home/projects/angular-covnkk/node_modules/tapable/lib/Hook.js:14:14) at Compiler.newCompilation (/home/projects/angular-covnkk/node_modules/webpack/lib/Compiler.js:1054:30) at eval (/home/projects/angular-covnkk/node_modules/webpack/lib/Compiler.js:1099:29) at eval (eval at _0x53a6f5 (https://angular-covnkk.w.staticblitz.com/blitz.c1a2f33ebdb80ec1573b6337c828d176e80f0398.js:11:220541), :31:1) (Use node --trace-warnings ... to show where the warning was created) (node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:6) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Link to the blitz that caused the error

https://stackblitz.com/edit/angular-covnkk?file=package-lock.json

Steps to reproduce

  1. Open the page

Expected behavior

Should finish generating the: "browser application bundles (phase: setup)"

Screenshots

No response

Platform

Browser name  = Chrome 
Full version  = 96.0.4664.45
Major version = 96
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 102390132,
  "usedJSHeapSize": 95973440,
  "jsHeapSizeLimit": 4294705152
}
Hash = c1a2f33ebdb80ec1573b6337c828d176e80f0398

Additional context

No response

jrvidal commented 2 years ago

@ezielcabahug Thanks for the report. This seems to be an upstream issue, see #477 and #473