0

I am developing a web application with Angular 16 in Webstorm. The web application is currently pre-release and only has a small portion of minimum functionality completed. I was editing with ng serve running testing changes as I made them when the compiler stopped compiling the app emitting the following error:

Error: node_modules/@angular/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts:37:247 - error TS2694: Namespace 'ts' has no exported member 'ResolutionMode'.

37     resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[] | readonly ts.FileReference[], containingFile: string, redirectedReference: ts.ResolvedProjectReference | undefined, options: ts.CompilerOptions, contain
ingFileMode?: ts.ResolutionMode) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;

I have tried:

  • removing all of my changes related to what I was working on (dismissing a modal dialog) including the service calls to my API
  • updated the installed version of TypeScript,
  • updated all Angular packages to ensure that they are all of the same version with one another.
  • deleted node_modules and ran npm install again just to be sure.
  • cloned the repo to a new machine and attempted to build it there all with the same result ensuring this was not some weird environment fluke.

Github repo exhibiting the problem.

Has anyone ever had an instance where Angular just straight up does not recognize a base TypeScript member? I have navigated to typescript.d.ts and ResolutionMode is in fact noted in there.

CodeWarrior
  • 7,388
  • 7
  • 51
  • 78

1 Answers1

0

OK, turns out updating typescript was what fixed it. I don't know what I did before, when I THOUGHT I was updating typescript, nor why it took weeks for compiler-cli to decide to error out.

It appears that I WAS running Typescript 4.9.4. Now, update.angular.io SAYS that Typescript versions above 4.9.3 are required, but this appears to be not entirely correct. Regardless, updating Typescript fixed the problem.

CodeWarrior
  • 7,388
  • 7
  • 51
  • 78