Angular-cli: 25.5

Created on 13 Jan 2017  路  4Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

windows10

Versions.

25.5

Repro steps.

Nothing change on my code juste update from v24 to 25.5 and run ng serve or ng build I receive this same error ! How achieve?

The log given by the failure.

ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
    at Object.getNewLineCharacter (C:\Users\e\WebstormProjects\i10\node_modules\typescript\lib\typescript.js:8062:20)
    at Object.createCompilerHost (C:\Users\e\WebstormProjects\i10\node_modules\typescript\lib\typescript.js:44978:26)
    at Object.ngcLoader (C:\Users\e\WebstormProjects\i10\node_modules\@ngtools\webpack\src\loader.js:171:31)
 @ multi main

Mention any other details that might be useful.

Always I update CLI always I have error. I never update cli without error !

SOLVED

I remove my /node_modules folder and run again npm install
PS: it seems when run ng init on existant project (yes I override package.json) so I think "npm install" isn't really executed or what happens? Maybe npm bug

you can close issue but this is second time (after cli udpate) I get this newLine .... error

Most helpful comment

I reInstalled the npm, and I still have the same error

ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (/Users/Felipe/workspaces/workspace IntelliJ14/myproject/node_modules/typescript/lib/typescript.js:9580:20)

All 4 comments

Always follow the update instructions https://github.com/angular/angular-cli#updating-angular-cli

@istiti the steps on https://github.com/angular/angular-cli#updating-angular-cli really need to be followed. We're working on a better upgrade journey but for now your really need to do those in order to update.

I reInstalled the npm, and I still have the same error

ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (/Users/Felipe/workspaces/workspace IntelliJ14/myproject/node_modules/typescript/lib/typescript.js:9580:20)

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings