Thursday, 11 May 2017

Typescript is invalid

I upgraded angular to 4 and angular cli to 1.03. After I run the command npm ls typescript I get:

+-- @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

What's the difference between the first and the second typescript, why is the second one invalid/how do I fix it?

I think the error above is the reason why I get the error below so I hope there is a fix for both so I can run my application again.

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



via Jan De Dev

No comments:

Post a Comment