Skip to content

Cannot find module 'angularfire2' when using Angular-CLI and RC.4 #401

@thehashrocket

Description

@thehashrocket

I'm using angular-cli with the lastest RC4 version of Angular.

I was following the steps here:
https://github.com/angular/angularfire2/blob/master/docs/1-install-and-setup.md

But I had to make a few very small changes. For one, I'm installing AngularFire this way:
npm install git+https://github.com/angular/angularfire2.git --save so that I have a version that is compatible with RC4.

Secondly, when doing the typings step I do this:
typings install file:node_modules/firebase/firebase.d.ts --save --global && typings install because that's where the firebase.d.ts file is now it seems.

Next I do this:

var map = {
    'firebase': 'vendor/firebase/firebase.js',
    'angularfire2': 'vendor/angularfire2'
};
/** User packages configuration. */
var packages = {
    angularfire2: {
        defaultExtension: 'ts',
        main: 'angularfire2.ts'
    }
};

Where I use the .ts file because there isn't a .js file for angularfire2 in the node_modules/angularfire2 folder. Even in the source folder it's just .ts files.

So, once I get to step 7, and do this:
import { FIREBASE_PROVIDERS, defaultFirebase } from 'angularfire2';
everything falls apart. I'm not sure why, it should work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions