Module '"/node_modules/angularfire2/angularfire2"' has no exported member 'AngularFireModule'.
I am trying to use the latest version of AngularFire with the webpack 2 angular-cli and RC.5. However when I try to setup my firebase I get this error:
Module '"C:/Users/dalto/Documents/Deadspot/node_modules/angularfire2/angularfire2"' has no exported member 'AngularFireModule'.
I have checked angularFire but I do not see any AngularFireModule exported.
Haven't released the RC5 version yet. Should have it out today.
It's also worth noting we haven't experimented with AngularFire2 and the Webpack version of the CLI.
@DMPS if you are on a hurry you can pull the repo from github instead of npm using
npm install git+https://github.com/angular/angularfire2.git
And then import from the src folder:
import { AngularFireModule } from 'angularfire2/src/angularfire2';
(worked for me)
@lfarroco @DMPS While that will work, installing from master is a risky business. Proceed cautiously :)
@lfarroco @DMPS Can you try the pre-release version?
npm install firebase angularfire2@next --save
@davideast
I am getting this errors:
[1] node_modules/angularfire2/auth/auth.d.ts(11,20): error TS1112: A class member cannot be declared optional.
[1] node_modules/angularfire2/database/firebase_object_observable.d.ts(6,17): error TS1112: A class member cannot be declared optional.
@vladotesanovic What version of Typescript are you on? This requires 2.0+
@davideast Yes i see now in package.json "typescript": "next" it is good now :+1:
My application is running fine, though I still have few reading and saving operations.
@davideast can you give us some tips to get it working with the webpack version of the angular-cli?
well adding "firebase" to tsconfig.json in types array seem to work!
I'm using the same angular-cli@webpack and still having the same issues after following the suggested solutions. I'm still getting the error of cannot find namespace 'firebase'.
These are the steps I took:
- npm install firebase angularfire2@next --save
- npm install [email protected] --save-dev
import { AngularFireModule } from 'angularfire2';
What am I missing?
@RedFour You might try copying the firebase3.d.ts to your typings folder, or typings install firebase.
I've tried both your suggestions and still get the same error of can't find firebase.
@RedFour Can I see your tsconfig.json file?
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
],
"types": [
"jasmine"
]
}
}
@RedFour add "firebase" to types array
like this?
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
],
"types": [
"jasmine",
"firebase"
]
}
}
yup
I'm still getting the same errors.
@RedFour run npm list at the root of the project and send a gist or pastbin with the output