How to fix Cannot find module 'typescript' in Angular 4?

后端 未结 11 639
遥遥无期
遥遥无期 2020-12-09 07:40

I generated Angular 4 app 3 weeks ago using the @angular/cli. After 2 weeks, I tried to run it with the command line \"ng serve\" but I am prompted an error bel

11条回答
  •  失恋的感觉
    2020-12-09 08:00

    I had a similar problem when I rearranged the folder structure of a project. I tried all the hints given in this thread but none of them worked. After checking further I discovered that I forgot to copy an important hidden file over to the new directory. That was

    .angular-cli.json

    from the root directory of the @angular/cli project. After I copied that file over all was running as expected.

提交回复
热议问题