x)
@angular/cli: 1.0.0-rc.2
node: 6.10.0
os: linux x64
npm version: 3.10.10
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
ng serve
ERROR in ./src/main.ts
Module build failed: TypeError: Cannot read property 'newLine' of undefined
at Object.getNewLineCharacter (/home/bunyamin/WebstormProjects/c3dp/node_modules/typescript/lib/typescript.js:8062:20)
at Object.createCompilerHost (/home/bunyamin/WebstormProjects/c3dp/node_modules/typescript/lib/typescript.js:44978:26)
at Object.ngcLoader (/home/bunyamin/WebstormProjects/c3dp/node_modules/@ngtools/webpack/src/loader.js:202:31)
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
It was an existing project created by older version of angular-cli. It was working well before updating angular-cli, node and npm. After updates, it produced the error above by just typing ng serve.
There is a similar issue which is closed (#3781) but I couldn't find a solution from it.
even I am getting the same error.
Dupe of #3781, you can find an answer in https://github.com/angular/angular-cli/issues/3781#issuecomment-285020354.
I also suggest the RC update guide: https://github.com/angular/angular-cli/wiki/stories-rc-update
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._
Most helpful comment
even I am getting the same error.