aspnetcore-angular-universal: RROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.

Just reporting this issue in case others experience the same problem with new installs when npm install.

2019-01-31T13:01:02.7557301Z     ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected.
2019-01-31T13:01:02.7557613Z     node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected.
2019-01-31T13:01:02.7557888Z     node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.

This happens because the latest rxjs version is no longer compatible with the typescript version we use for the starter (“~2.7.2”). Pinning the rxjs version from “^6.2.0” to “6.2.0” addresses the problem (apparently 6.3.3 should be OK according to the comments at https://stackoverflow.com/questions/54434333/error-ts1005-expected-typescript-angular-6-for-first-build-error-rxjs-insi)

Probably typescript should be upgraded to a higher version soon…

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@Ollynov remove the carat symbol (^) before the version number for rxjs. It worked for me and I also changed the version to 6.2.2

  • Remove the “node_modules” folder from your project
  • Go to package.json
  • Change rxjs version to “rxjs”: “6.3.3”
  • Go to console and run “npm install” again
  • And then run “ng serve”

It should work now !!

Go to package.json

change rxjs to “rxjs”: “6.0.0”, and save

go to console and type

“npm update”

after that type

“ng serve”

i changed to below.

"rxjs": "6.2.2",
"rxjs-compat": "6.2.2",

I continue to get the same error on any of those versions mentioned. (even after deleting node modules and installing again)

Coming to comment that the error ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected exists for rxjs 6.5.0, however uninstalling that and installing @6.3.3 fixes the issue.

try without changing anything npm install rxjs@X.X.X X.X.X -> you current version

@winfredchen thank you! This solution worked for me after a few hours of trying the other solutions.

@RajithaAlluri …This works for me as well thanks

does anyone knows whats happening under the hood

This worked for me. Thanks Rajnitha!