TrilonIO / aspnetcore-angular-universal

ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.46k stars 435 forks source link

RROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ';' expected. #714

Closed alexbenitez closed 5 years ago

alexbenitez commented 5 years ago

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....

amilathennakoon commented 5 years ago

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"

RajithaAlluri commented 5 years ago

It should work now !!

FreDP47 commented 5 years ago

This worked for me. Thanks Rajnitha!

nikithaperuka89 commented 5 years ago

@amilathennakoon updated "rxjs": "^6.0.0" to "rxjs": "6.0.0" I get the below error

ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305: Module '"/export/appl/fqdprod/jenkins_rd/workspace/CI000000024053883/B2BGatewayUI/Build_Release_1.1/b2bgateway-ui/node_modules/rxjs/internal-compatibility/index"' has no exported member 'ShareReplayConfig'.

Below is the version of rxjs-compat from my package.json

"rxjs-compat": "^6.2.2"

Should I align the version of rxjs-compat based on the change made to rxjs version ? Please advice !

AlexandraBryantKS commented 5 years ago

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.

Ollynov commented 5 years ago

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

aishwaryardandi commented 5 years ago

@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

ctviky commented 5 years ago

This worked for me. Thanks.

liuchang0920 commented 5 years ago

does anyone knows whats happening under the hood

paramsharma commented 5 years ago

@RajithaAlluri ..This works for me as well thanks

winfredchen commented 5 years ago

i changed to below.

"rxjs": "6.2.2",
"rxjs-compat": "6.2.2",
Jeklah commented 5 years ago

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

MarkPieszak commented 5 years ago

Pushed to Master! Thanks for uncovering this one folks!! 🙏

zekicelik commented 5 years ago

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