Why in angular observable timer is working locally not working after deployment?Angular 5: Module not found: Error: Can't resolve '@angular/forms/src/validators''ng build' keep creates 'angular.io.example'Can't import import map from 'rxjs/operators';Bootstrap not working with my Angular projectAngular material expansion panel error - TypeError: this.driver.containsElement is not a functionCould not find an NgModule. Use the skip-import option to skip importing in NgModuleUnable to get the path nor url from angular routerError when deploying app with “ng build --prod”NativeScript Angular project 'tns run android' gives errorsTypeError: this._compiler is null in http://localhost:9876/_karma_webpack_/vendor.js line 23 > eval (line 984)
Landing in very high winds
How to deal with fear of taking dependencies
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
Is Social Media Science Fiction?
Information to fellow intern about hiring?
"listening to me about as much as you're listening to this pole here"
Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?
Is "plugging out" electronic devices an American expression?
New order #4: World
If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?
What is the offset in a seaplane's hull?
How could a lack of term limits lead to a "dictatorship?"
How is it possible for user's password to be changed after storage was encrypted? (on OS X, Android)
extract characters between two commas?
Can I legally use front facing blue light in the UK?
Extreme, but not acceptable situation and I can't start the work tomorrow morning
Is there a way to make member function NOT callable from constructor?
How would photo IDs work for shapeshifters?
What to wear for invited talk in Canada
What happens when a metallic dragon and a chromatic dragon mate?
Is it wise to hold on to stock that has plummeted and then stabilized?
What is GPS' 19 year rollover and does it present a cybersecurity issue?
aging parents with no investments
Is this food a bread or a loaf?
Why in angular observable timer is working locally not working after deployment?
Angular 5: Module not found: Error: Can't resolve '@angular/forms/src/validators''ng build' keep creates 'angular.io.example'Can't import import map from 'rxjs/operators';Bootstrap not working with my Angular projectAngular material expansion panel error - TypeError: this.driver.containsElement is not a functionCould not find an NgModule. Use the skip-import option to skip importing in NgModuleUnable to get the path nor url from angular routerError when deploying app with “ng build --prod”NativeScript Angular project 'tns run android' gives errorsTypeError: this._compiler is null in http://localhost:9876/_karma_webpack_/vendor.js line 23 > eval (line 984)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
The below code working proper in locally but after deployment it doesn't work.
import Observable from "rxjs/Observable";
let somethingTimer = Observable.timer(5000);
// rest of other code.
After changing above code to below code working proper both locally and on production server.
import timer from 'rxjs/observable/timer';
let somethingTimer = timer(5000);
// rest of other code.
Why this happen any explanation.
Configuration:
Angular CLI: 6.0.3
Node: 8.11.2
OS: win32 x64
Angular:
...
Package Version
--------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.2.0
typescript 2.7.2
Error in console log
TypeError: a.timer is not a function
angular rxjs angular6
add a comment |
The below code working proper in locally but after deployment it doesn't work.
import Observable from "rxjs/Observable";
let somethingTimer = Observable.timer(5000);
// rest of other code.
After changing above code to below code working proper both locally and on production server.
import timer from 'rxjs/observable/timer';
let somethingTimer = timer(5000);
// rest of other code.
Why this happen any explanation.
Configuration:
Angular CLI: 6.0.3
Node: 8.11.2
OS: win32 x64
Angular:
...
Package Version
--------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.2.0
typescript 2.7.2
Error in console log
TypeError: a.timer is not a function
angular rxjs angular6
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01
add a comment |
The below code working proper in locally but after deployment it doesn't work.
import Observable from "rxjs/Observable";
let somethingTimer = Observable.timer(5000);
// rest of other code.
After changing above code to below code working proper both locally and on production server.
import timer from 'rxjs/observable/timer';
let somethingTimer = timer(5000);
// rest of other code.
Why this happen any explanation.
Configuration:
Angular CLI: 6.0.3
Node: 8.11.2
OS: win32 x64
Angular:
...
Package Version
--------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.2.0
typescript 2.7.2
Error in console log
TypeError: a.timer is not a function
angular rxjs angular6
The below code working proper in locally but after deployment it doesn't work.
import Observable from "rxjs/Observable";
let somethingTimer = Observable.timer(5000);
// rest of other code.
After changing above code to below code working proper both locally and on production server.
import timer from 'rxjs/observable/timer';
let somethingTimer = timer(5000);
// rest of other code.
Why this happen any explanation.
Configuration:
Angular CLI: 6.0.3
Node: 8.11.2
OS: win32 x64
Angular:
...
Package Version
--------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.2.0
typescript 2.7.2
Error in console log
TypeError: a.timer is not a function
angular rxjs angular6
angular rxjs angular6
edited Mar 8 at 9:00
R.A.Munna
asked Mar 8 at 6:26
R.A.MunnaR.A.Munna
960617
960617
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01
add a comment |
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01
add a comment |
3 Answers
3
active
oldest
votes
The problem is that you have RxJS 6 but you're trying to use timer
as in RxJS 5 (RxJS 5 used now deprecated patching of the Observable
class).
Since RxJS 6 the only way of using operators and so called "Observable creation methods" is by importing them directly from 'rxjs'
or 'rxjs/operators'
respectively:
import timer from 'rxjs';
let somethingTimer = timer(5000);
For migration docs see:
https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md
https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
add a comment |
You upgraded from rxjs 5 to 6. There were many changes from 5 to 6.
The first example is rxjs 5 code and the second is how you do it in 6.
add a comment |
It has to do with the way that "timer" is imported.
In case 1 the timer is coming from the "observable" object but on second one is a separate let
import timer
in my opinion bet way is import timer from 'rxjs/observable/timer';
i hope to help you
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057829%2fwhy-in-angular-observable-timer-is-working-locally-not-working-after-deployment%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is that you have RxJS 6 but you're trying to use timer
as in RxJS 5 (RxJS 5 used now deprecated patching of the Observable
class).
Since RxJS 6 the only way of using operators and so called "Observable creation methods" is by importing them directly from 'rxjs'
or 'rxjs/operators'
respectively:
import timer from 'rxjs';
let somethingTimer = timer(5000);
For migration docs see:
https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md
https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
add a comment |
The problem is that you have RxJS 6 but you're trying to use timer
as in RxJS 5 (RxJS 5 used now deprecated patching of the Observable
class).
Since RxJS 6 the only way of using operators and so called "Observable creation methods" is by importing them directly from 'rxjs'
or 'rxjs/operators'
respectively:
import timer from 'rxjs';
let somethingTimer = timer(5000);
For migration docs see:
https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md
https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
add a comment |
The problem is that you have RxJS 6 but you're trying to use timer
as in RxJS 5 (RxJS 5 used now deprecated patching of the Observable
class).
Since RxJS 6 the only way of using operators and so called "Observable creation methods" is by importing them directly from 'rxjs'
or 'rxjs/operators'
respectively:
import timer from 'rxjs';
let somethingTimer = timer(5000);
For migration docs see:
https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md
https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md
The problem is that you have RxJS 6 but you're trying to use timer
as in RxJS 5 (RxJS 5 used now deprecated patching of the Observable
class).
Since RxJS 6 the only way of using operators and so called "Observable creation methods" is by importing them directly from 'rxjs'
or 'rxjs/operators'
respectively:
import timer from 'rxjs';
let somethingTimer = timer(5000);
For migration docs see:
https://github.com/ReactiveX/rxjs/blob/master/docs_app/content/guide/v6/migration.md
https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md
answered Mar 8 at 9:07
martinmartin
46.9k1196139
46.9k1196139
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
add a comment |
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
I have also searched for that and found medium.com/code-divoire/…. Thanks for explaining.
– R.A.Munna
Mar 9 at 8:06
add a comment |
You upgraded from rxjs 5 to 6. There were many changes from 5 to 6.
The first example is rxjs 5 code and the second is how you do it in 6.
add a comment |
You upgraded from rxjs 5 to 6. There were many changes from 5 to 6.
The first example is rxjs 5 code and the second is how you do it in 6.
add a comment |
You upgraded from rxjs 5 to 6. There were many changes from 5 to 6.
The first example is rxjs 5 code and the second is how you do it in 6.
You upgraded from rxjs 5 to 6. There were many changes from 5 to 6.
The first example is rxjs 5 code and the second is how you do it in 6.
answered Mar 8 at 7:35
Adrian BrandAdrian Brand
4,86621124
4,86621124
add a comment |
add a comment |
It has to do with the way that "timer" is imported.
In case 1 the timer is coming from the "observable" object but on second one is a separate let
import timer
in my opinion bet way is import timer from 'rxjs/observable/timer';
i hope to help you
add a comment |
It has to do with the way that "timer" is imported.
In case 1 the timer is coming from the "observable" object but on second one is a separate let
import timer
in my opinion bet way is import timer from 'rxjs/observable/timer';
i hope to help you
add a comment |
It has to do with the way that "timer" is imported.
In case 1 the timer is coming from the "observable" object but on second one is a separate let
import timer
in my opinion bet way is import timer from 'rxjs/observable/timer';
i hope to help you
It has to do with the way that "timer" is imported.
In case 1 the timer is coming from the "observable" object but on second one is a separate let
import timer
in my opinion bet way is import timer from 'rxjs/observable/timer';
i hope to help you
answered Mar 8 at 7:46
imamalisimamalis
214
214
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55057829%2fwhy-in-angular-observable-timer-is-working-locally-not-working-after-deployment%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean by “doesn’t work”?
– martin
Mar 8 at 7:34
@martin I have updated the question with error message from console after inspecting.
– R.A.Munna
Mar 8 at 9:01