ReactiveX/rxjs

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

Closed this issue · 36 comments

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

Closing this as a dupe of #4512 as I believe that is the underlying problem.

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

Cambie de rxjs 6.4.0 a "rxjs": "6.0.0",
funcionó para mí

@AliAdravi can you show me how did you do it?

@aleRozo
npm install rxjs@6.0.0 --save

thanks @AliAdravi

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

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!

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!

Si aún estás enfrentando el problema, ve a package.json

quite rxjs y agregue rxjs-compat también, "rxjs-compat": "^ 6.4.0" a "rxjs-compat": "6.4.0",

cambiar la versión de typscript a 2.8

ejecutar npm instalar
Esto funcionará para usted!

Thank you, this did work for me

@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

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

@realsony , Did you find the solution for this?

@fahrimz , It didn't solved for me.

@realsony , Did you find the solution for this?

i solved it but right now I cannot remember in detail how to. Sorry. Right now I use:
"rxjs": "~6.3.3" and "typescript": "~3.2.2" which works

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

This worked for me in ionic@3

sudo npm install -g typescript@latest
npm i rxjs@6.3.3 rxjs-compat@6.3.3 promise-polyfill --save

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

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

As for most of you, below command works for me as well:
npm install rxjs@6.0.0 --save

Started using yarn today and i fixed it with

yarn add rxjs@6.0.0

@aleRozo
npm install rxjs@6.0.0 --save

thanks @AliAdravi

it work for me

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

It worked for me

@aleRozo
npm install rxjs@6.0.0 --save
thanks @AliAdravi

Worked for me!

npm install rxjs@6.0.0 --save
work for me
Thanks very much

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

It worked. Thanks

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

Thank you, @cordsac.

Doing this "npm install rxjs@6.0.0 --save" solved my problem. Thanks!

npm uninstall rxjs (higher version of rxjs above 6.0.0)
npm install rxjs@6.0.0 --save

This is worked for me!

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

Worked for me as well!

Cambie de rxjs 6.4.0 a "rxjs": "6.0.0",
funcionó para mí

@AliAdravi can you show me how did you do it?

Open up package.json, and change "rxjs": "^6.0.0", to "rxjs": "6.0.0"
I hope it helps.

Why did this work?

  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