简体   繁体   English

无法运行角度应用程序

[英]Unable to run angular application

I installed node and npm in my local and @angular cli v6.1.1. 我在本地和@angular cli v6.1.1中安装了node和npm。 and created application name with ANGULAR6. 并使用ANGULAR6创建了应用程序名称。 then try to run the application but i'm getting error. 然后尝试运行应用程序,但我收到错误。

PS C:\Users\762739\Desktop\Local _test_Files\Angular\ANGULAR6> ng serve
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
       10% building modules 6/6 modules 0 activei 「wds」: Project is running at http://localhost:4200/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\Users\762739\Desktop\Local _test_Files\Angular\ANGULAR6
i 「wds」: 404s will fallback to //index.html
Date: 2019-05-29T12:03:00.535Z
Hash: 39bd7e13701cafb5c814
Time: 2887ms
chunk {main} main.js, main.js.map (main) 344 kB [entry] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 344 kB [entry] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 359 kB [entry] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 10.2 kB [initial] [rendered]

ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.
node_modules/rxjs/internal/types.d.ts(82,52): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(82,88): error TS1005: ';' expected.
node_modules/rxjs/internal/types.d.ts(82,92): error TS1109: Expression expected.
npm install rxjs@6.0.0 --save

这样可以解决问题

There are two solutions: 有两种解决方案:

1- Update your TS version: TS ^2.8 You can update the Typescript by changing the version of Typescript in the package.json from your xx version to "typescript": "~2.8" 1-更新您的TS版本:TS ^ 2.8您可以通过将package.json的Typescript版本从xx版本更改为“typescript”来更新Typescript "typescript": "~2.8"

2- Use the following version: 2-使用以下版本:

npm install rxjs@6.0.0 --save 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM