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

Bug Report

Current Behavior There is a missing ‘;’ reported for types.d.ts

                                                                                          
Date: 2019-02-07T20:57:38.886Z
Hash: d01965b30f3394f9889f
Time: 2174ms
chunk {main} main.js, main.js.map (main) 1.93 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 683 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 15.6 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 335 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.```

**Reproduction**
```
Install Angular and NPM current versions.
ng new test
npm install
ng serve --host 0.0.0.0 
Output will show the error on the missing ';'
```

**Expected behavior**
Expect it to work and have the correction made for the missing semi-colon.

**Environment**
Angular CLI: 6.0.8
Node: 11.6.0
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.6.8
@angular/cli                      6.0.8
@ngtools/webpack                  6.0.8
@schematics/angular               0.6.8
@schematics/update                0.6.8
rxjs                              6.4.0
typescript                        2.7.2
webpack                           4.8.3

**Possible Solution**
<!--- Only if you have suggestions on a fix for the bug -->

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 8
  • Comments: 36

Commits related to this issue

Most upvoted comments

@aleRozo npm install rxjs@6.0.0 --save

thanks @AliAdravi

Change to from rxjs 6.4.0 TO “rxjs”: “6.0.0”, It worked for me

I just upgraded the Angular CLI and Core for my project to the latest versions using “ng update @angular/cli @angular/core” inside the project and the problem went away. Hope this helps!

  1. “rxjs”: “^6.0.0” change “rxjs”: “6.0.0”
  2. and next go to terminal
  3. and install npm using this command “npm i”
  4. enjoy

You need to do some changes in package.json

  1. Go to package.json and modify "rxjs": "^6.0.0" to "rxjs": "6.0.0"

  2. Then run npm update in your project

@realsony I got the same error. Changing “rxjs”: “^6.0.0” to “6.0.0” fix the error

Go to your project directory and run the command >npm install rxjs@6.0.0 --save

@aleRozo npm install rxjs@6.0.0 --save

thanks @AliAdravi

Worked for me. Thanks.

Nothing of these solutions worked for me.

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

-arrived here by google

  1. “rxjs”: “^6.0.0” change “rxjs”: “6.0.0”
  2. and next go to terminal
  3. and install npm using this command “npm i”
  4. enjoy

This worked for me. Thanks

npm install rxjs@6.0.0 --save Worked for me, thanks

npm install rxjs@6.0.0 --save Worked for me, thanks

if you are still facing the problem, go to package.json

remove rxjs and add rxjs-compat also, “rxjs-compat”: “^6.4.0” to “rxjs-compat”: “6.4.0”,

change the typscript version to 2.8

run npm install This will work for you!

If you are using rxjs-compat then you also need to do following in order to fixed the issue. change the rxjs-compat version from “rxjs-compat”: “^6.2.2” to “rxjs-compat”: “6.2.2”

Hope this will help!

Closing this as a dupe of https://github.com/ReactiveX/rxjs/issues/4512 as I believe that is the underlying problem.