【发布时间】:2017-10-10 10:13:54
【问题描述】:
我将 angular 升级到 4,将 angular cli 升级到 1.03。
运行命令npm ls typescript 后,我得到:
+-- @angular/cli@1.0.3
| `-- typescript@2.2.2
`-- typescript@2.2.2 invalid
npm ERR! invalid: typescript@2.2.2 C:\development\projects-git\mydoc\static-web\node_modules\typescript
第一个和第二个打字稿有什么区别,为什么第二个无效/我该如何解决?
我认为上面的错误是我得到下面错误的原因,所以我希望能解决这两个问题,以便我可以再次运行我的应用程序。
ERROR in AppModule is not an NgModule
ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (..\static-web\node_modules\typescript\lib\typescript.js:9580:20)
at Object.createCompilerHost (..\static-web\node_modules\typescript\lib\typescript.js:66674:26)
at Object.ngcLoader (..\static-web\node_modules\@ngtools\webpack\src\loader.js:202:31)
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
【问题讨论】:
标签: node.js angular typescript angular-cli