我三周前用@angle/cli 生成了 Angular 4应用程序。两个星期后,我试图用命令行 ng serve
运行它,但我被提示出现以下错误:
Cannot find module 'typescript'
Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\mypc\Documents\Angular Projects\my-angular-app\node_modules\@angular\cli\models\config\config.js:5:12)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
你知道怎么修吗,谢谢。