2017-04-06 42 views
1

我是Angular2和@ angular-cli中的新成员。我下载了@ angular-cli,我尝试使用livereload但不起作用。我试图在版本1.4.2降级,但仍然无法正常工作。@ angular-cli ng serve livereload does not work

我有这样的失败:

ERROR in ./src/main.ts 
Module build failed: TypeError: Cannot read property 'newLine' of undefined 
    at Object.getNewLineCharacter (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/typescript/lib/typescript.js:9514:20) 
    at Object.createCompilerHost (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/typescript/lib/typescript.js:63770:26) 
    at Object.ngcLoader (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/@ngtools/webpack/src/loader.js:380:33) 
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts 

ERROR in ./src/polyfills.ts 
Module build failed: TypeError: Cannot read property 'newLine' of undefined 
    at Object.getNewLineCharacter (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/typescript/lib/typescript.js:9514:20) 
    at Object.createCompilerHost (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/typescript/lib/typescript.js:63770:26) 
    at Object.ngcLoader (/home/cesar/Repositorios/proyectoAlbum/client-albums/node_modules/@ngtools/webpack/src/loader.js:380:33) 
@ multi ./src/polyfills.ts 

这是我的版本@角CLI和节点

/\ _ __ __ _ _ _| | __ _ _ __ /___| | |_ _| 
/△ \ | '_ \/_` | | | | |/ _` | '__| | | | | | | 
/___ \| | | | (_| | |_| | | (_| | |  | |___| |___ | | 
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_|  \____|_____|___| 
       |___/ 
@angular/cli: 1.0.0 
node: 6.10.2 
os: linux x64 
@angular/common: 4.0.1 
@angular/compiler: 4.0.1 
@angular/core: 4.0.1 
@angular/forms: 4.0.1 
@angular/http: 4.0.1 
@angular/platform-browser: 4.0.1 
@angular/platform-browser-dynamic: 4.0.1 
@angular/router: 4.0.1 
@angular/cli: 1.0.0 
@angular/compiler-cli: 4.0.1 

的问候!

回答