Angular 5. Error: ./node_modules/rxjs/observable ... [PDF]

Nov 13, 2017 - Hi all ! Could anyone suggest please … how properly in Angular 5 use RXJS operators ? I can not build m

21 downloads 33 Views 42KB Size

Recommend Stories


Error budget and uncertainty calculations: Angular measurement
Make yourself a priority once in a while. It's not selfish. It's necessary. Anonymous

Error budget and uncertainty calculations: Angular measurement
We may have all come on different ships, but we're in the same boat now. M.L.King

5 error codes
The happiest people don't have the best of everything, they just make the best of everything. Anony

11-2-5 Error Messages
You miss 100% of the shots you don’t take. Wayne Gretzky

PDF Angular 2 By Example
The beauty of a living thing is not the atoms that go into it, but the way those atoms are put together.

PDF Descartes Error
You often feel tired, not because you've done too much, but because you've done too little of what sparks

[PDF] Angular 2 By Example
In the end only three things matter: how much you loved, how gently you lived, and how gracefully you

Angular Update Guide - Beta [PDF]
Angular Update Guide. Select your current Angular version, and the desired version of Angular. We'll tell you the steps to update. from. to. How complex is your app? I use ngUpgrade. Package Manager. Show me how to update!

Angular 4
You can never cross the ocean unless you have the courage to lose sight of the shore. Andrè Gide

ERROR 20534 ERROR 20534
Don’t grieve. Anything you lose comes round in another form. Rumi

Idea Transcript


Angular 5. Error: ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js anton_klochko

Nov '17

Hi all ! Could anyone suggest please … how properly in Angular 5 use RXJS operators ? I can not build my app.

Nov 2017 1 / 10 Nov 2017

I receive the error when building with --prod flag (ionic). Error: ./node_modules/rxjs/observable/BoundNodeCallbackObservable.js Module build failed: TypeError: Cannot read property 'type' of undefined at Object.getEffectiveTypeAnnotationNode (D:\tmp\ionic2\ezpart-mobile-svn\no de_modules\typescript\lib\typescript.js:9341:17) at assignContextualParameterTypes (D:\tmp\ionic2\ezpart-mobile-svn\node_modu les\typescript\lib\typescript.js:41652:25) at checkFunctionExpressionOrObjectLiteralMethod (D:\tmp\ionic2\ezpart-mobile -svn\node_modules\typescript\lib\typescript.js:41948:29) at checkExpressionWorker (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\types cript\lib\typescript.js:42959:28) at checkExpression (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\ lib\typescript.js:42898:42) at checkExpressionCached (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\types cript\lib\typescript.js:42779:38) at checkReturnStatement (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typesc ript\lib\typescript.js:45418:54) at checkSourceElement (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescri pt\lib\typescript.js:46763:28) at Object.forEach (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\l ib\typescript.js:1506:30) at checkBlock (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\lib\t ypescript.js:44563:16) @ ./node_modules/rxjs/observable/bindNodeCallback.js 2:36-76 @ ./node_modules/rxjs/add/observable/bindNodeCallback.js @ ./node_modules/rxjs/Rx.js @ ./src/providers/loginProvider.ts @ ./src/app/app.module.ngfactory.js @ ./src/app/main.ts,./node_modules/rxjs/observable/BoundCallbackObservable.js Module build failed: TypeError: Cannot read property 'type' of undefined at Object.getEffectiveTypeAnnotationNode (D:\tmp\ionic2\ezpart-mobile-svn\no de_modules\typescript\lib\typescript.js:9341:17) at assignContextualParameterTypes (D:\tmp\ionic2\ezpart-mobile-svn\node_modu les\typescript\lib\typescript.js:41652:25) at checkFunctionExpressionOrObjectLiteralMethod (D:\tmp\ionic2\ezpart-mobile -svn\node_modules\typescript\lib\typescript.js:41948:29) at checkExpressionWorker (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\types cript\lib\typescript.js:42959:28) at checkExpression (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\ lib\typescript.js:42898:42) at checkExpressionCached (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\types cript\lib\typescript.js:42779:38) at checkReturnStatement (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typesc ript\lib\typescript.js:45418:54) at checkSourceElement (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescri pt\lib\typescript.js:46763:28) at Object.forEach (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\l ib\typescript.js:1506:30) at checkBlock (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\typescript\lib\t ypescript.js:44563:16) @ ./node_modules/rxjs/observable/bindCallback.js 2:32-68 @ ./node_modules/rxjs/add/observable/bindCallback.js @ ./node_modules/rxjs/Rx.js @ ./src/providers/loginProvider.ts @ ./src/app/app.module.ngfactory.js @ ./src/app/main.ts at BuildError.Error (native) at new BuildError (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\@ionic\app-s cripts\dist\util\errors.js:16:28) at callback (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\@ionic\app-scripts \dist\webpack.js:121:28) at emitRecords.err (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\webpack\lib \Compiler.js:269:13) at Compiler.emitRecords (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\webpac k\lib\Compiler.js:375:38) at emitAssets.err (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\webpack\lib\ Compiler.js:262:10) at applyPluginsAsyncSeries1.err (D:\tmp\ionic2\ezpart-mobile-svn\node_module s\webpack\lib\Compiler.js:368:12) at next (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\tapable\lib\Tapable.js :218:11) at Compiler.compiler.plugin (D:\tmp\ionic2\ezpart-mobile-svn\node_modules\we bpack\lib\performance\SizeLimitsPlugin.js:99:4) at Compiler.applyPluginsAsyncSeries1 (D:\tmp\ionic2\ezpart-mobile-svn\node_m odules\tapable\lib\Tapable.js:222:13) import { timeout } from 'rxjs/operator/timeout'; import { map } from 'rxjs/operator/map'; this.http.post(this.login.rootUrl + 'logs.php', send).timeout(30000 ).map( res=>res.json() ).subscribe(ans=> { loading.dismissAll(); resolve(ans); }, Should I using .pipe() ? When I am trying this.http.post(this.actions.deactivate, data).pipe(timeout(30000)).subscribe(serverData => { … my development environment highlights an error near pipe. @ionic/cli-utils : 1.18.0 ionic (Ionic CLI) : 3.18.0 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 3.1.0 Cordova Platforms : android 6.2.3 Ionic Framework : ionic-angular 3.9.2 System: Android SDK Tools : 25.2.5 Node : v6.9.0 npm : 3.10.8 OS : Windows 7 Environment Variables: ANDROID_HOME : C:\Users\anton\AppData\Local\Android\sdk Misc: backend : pro

jbgomez21

Nov '17

Hi @anton_klochko I had same issue… The problem was I was using import ‘rxjs/add/observable/bindCallback’; I don’t know why it’s fail, but I commented that code line and it works. Regards

anton_klochko

Nov '17

jbgomez21, good day ! And how you now import bindCallback ? You using this operator in your code ?

jbgomez21

Nov '17

I’m not using import bindCallback, but I had the code line import ‘rxjs/add/observable/bindCallback’ in my source

pe1

Nov '17

I am getting the same error, no idea how to resolve so far ionic cordova run android --prod : ./node_modules/rxjs/observable/BoundCallbackObservable.js Module build failed: TypeError: Cannot read property 'type' of undefined @ionic/cli-utils : 1.18.0 ionic (Ionic CLI) : 3.18.0 global packages: cordova (Cordova CLI) : not installed local packages: @ionic/app-scripts : 3.1.1 Cordova Platforms : android 6.2.3 Ionic Framework : ionic-angular 3.9.2 System: Android SDK Tools : 25.2.5 Node : v6.9.2 npm : 5.3.0 OS : Windows 7

anton_klochko

Nov '17

npm install -g [email protected] and remove import 'rxjs'; help a little …

fkProunix

Nov '17

I just seem to have solved this for me by: updating to typescript 2.6.1 removing all import 'rxjs'; statements from various files (guess they were outdated anyway) adding a single import 'rxjs/Rx'; statement in the main.ts also I always use imports like import {Observable} from 'rxjs/Observable'; instead of import {Observable} from 'rxjs'; some peoeple seem to have had problems with those after upgrading see also https://github.com/angular/angular/issues/20095

pe1

Nov '17

I updated typescript to 2.6.1 and Observable and all operators (of, concat, timeout, retry, do, empty) i import from rxjs package: import { Observable } from 'rxjs'; Now i can build the app, thanks guys!

diarcastro

Nov '17

Please read de documentation since HttpClient section because some things have changed and you need to update them. Read this article: https://alligator.io/angular/angular-5/ and maybe you can use https://angular-updateguide.firebaseapp.com/

lakshmipm

i had same issue. I have changed import { Observable } from ‘rxjs/Rx’; to import { Observable } from ‘rxjs/Observable’;. It got resolved. I may be late but Hope it will help

Dec '17

Dec 2017

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.