Angular 6 and AngularFire2 RxJS Error - angularfire2

I want to create a new Angular 6 App with AngularFire 2.
Although I followed the tutorial, I get a version error.
AngularFire2 Setup Tutorial:
https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md
Even though I only tried to use an Observable as seen in the tutorial I get the following error:
ERROR in node_modules/angularfire2/angularfire2.d.ts(3,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/angularfire2/firestore/collection/changes.d.ts(3,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angularfire2/firestore/collection/collection.d.ts(3,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angularfire2/firestore/document/document.d.ts(3,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angularfire2/firestore/firestore.d.ts(3,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angularfire2/firestore/interfaces.d.ts(1,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Subscriber"' has no exported member 'Subscriber'.
node_modules/angularfire2/firestore/observable/fromRef.d.ts(2,10): error TS2305: Module '"/Users/tarek/Documents/Development/web_app/apphoven-web/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/Subscriber.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscriber'.
node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.
Am I correct that AngularFire 2 does not support Angular 6? Because it's not written anywhere. And I don't think it's a good idea to downgrade to the old Angular CLI... So, what can I do?

now work with
npm install --save rxjs-compat

Install the following file
npm install --save rxjs-compat

Add following code in polyfills.ts
(window as any).global = window;

npm install --save #rxjs-compat#5.0

You've to fix your Rxjs imports. There are some changes in the use of rxjs from v6 onwards. so,
Kindly import the observable as below
import { Observable } from 'rxjs';
instaed of import { Observable } from 'rxjs/Observable';
Hope this will fix your issue. Happy coding :)

npm i --save rxjs-compat helps!

Related

Parse Issue (Xcode): Module 'survey-kit' not found

When running flutter build IPA, this error occurs:
Parse Issue (Xcode): Module 'survey-kit' not found
~/ios/Runner/GeneratedPluginRegistratant.m:47:8
Encountered error while archiving for device.
Where the error is located there is an #import survey-kit command:
Where the error is
For some reason, it is having a problem finding survey_kit, yet the rest of the imports it can find. Here is survey_kit next to all of the other modules:
survey_kit
What could be the reason for the import command not being able to find survey_kit specifically?

Sudden VueJS error: ERROR in multi vue, module not found: Error: Can't resolve 'vue' in

Every day, I come to my office, launch my IDE (Code - OSS) and run npm run watch. Every day it works like a charm. But not today. Oddly enough, today running npm run watch fires this error:
ERROR in multi vue
Module not found: Error: Can't resolve 'vue' in
'/home/TopSecretUser/Code/Local/TopSecretProject/11.11.2020/dev'
# multi vue /js/vendor[0]
ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve 'vue' in
'/home/me/Code/Local/TopSecretProject/11.11.2020/dev/resources/js'
# ./resources/js/app.js 3:13-16 4:0-22 6:0-3 85:14-17
# multi ./resources/js/app.js ./resources/css/app.css
My app.js starts with the following lines:
require("./bootstrap");
import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
...
I haven't made any changes from yesterday to today, so I am totally confused. I tried some fixings but nothing worked. Does anyone have any suggestion how i can fix this? I am using vue#2.6.11.
You could delete the node_modules which could be affected by an external action like deletion/moving or you mis-installed a module, then rerun :
npm install
this will fetch the dependencies in package.json and install them, you should always install a module by adding --save or --save-dev flag with npm i like npm i some-module --save
guys I had this issue, after a while I found the solution , just import component as this:
Vue.component('Date',required('components/Date.vue'));
it's my pleasure to follow me on instagram: https://www.instagram.com/mahdiabedi220/

Can't use vuex(npm packages) in nativescript playground

I get error that vuex was not found but I've added the npm package and everything.
Here is the link to the playground

how to fix 'spark_dependencies function not found within extension package mleap' error in r

how to fix 'spark_dependencies function not found within extension package mleap' error in Rstudio, notice that i have failed previously to install mleap package. thanks

After i run the server i get "No module named 'crispy_forms'" message?

I have tried to installed django-crispy-forms ;however, i got this error: ImportError: No module named 'crispy_forms'
Ps. i needed to install with -sudo..
thank you

Resources