Angularfire: Webpack can't resolve angularfire2

Created on 15 Jul 2016  路  4Comments  路  Source: angular/angularfire

Following the setup for webpack as propsed at https://angular.io/docs/ts/latest/guide/webpack.html and putting import angularfire2 in "/src/vendor.ts" I get the following error.

ERROR in ./src/vendor.ts
Module not found: Error: Cannot resolve module 'angularfire2' in C:\project\src
 @ ./src/vendor.ts 10:0-23

Every other node module seems to work just fine.
I've run npm install angularfire2 [email protected] --save and then typings install dt~firebase then simply added the import statement. I'm not sure if I skipped a step.

Most helpful comment

@davideast what's the roadmap for upgrading to rc4?

All 4 comments

Check out our Setup and Install guide.

We do not support any version of the Firebase SDK <3.0, so you'll need to change your install statement. Also we provide our own typings for Firebase and we don't use typings.

Trying to use the Setup and Install guide fails right off the bat unfortunately.

npm WARN peerDependencies The peer dependency @angular/[email protected] included from angularfire2 will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @angular/[email protected] included from angularfire2 will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @angular/[email protected] included from angularfire2 will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @angular/[email protected] included from angularfire2 will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN peerDependencies The peer dependency @angular/[email protected] included from angularfire2 will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "angularfire2" "firebase" "--save" "--quiet"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package @angular/[email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.4
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/common@^2.0.0-rc.2
npm ERR! peerinvalid Peer [email protected] wants @angular/[email protected]

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Aderito\Desktop\davideast\npm-debug.log

I guess the problem might be that I don't have ReleaseCandidate 4 for Angular then it's a problem with the Angular CLI team -- I don't know.

However, I still do find that angularfire2 is undiscoverable, which is the original problem.
Am I to understand that I can't import or require angularfire2 as I would any other node_module after running npm install <module> on said module.

Anyway I think the setup warrants another issue being opened unless this is expected behavior. I do understand the project is still under development.

@aderito7 You also need to change the package.json to use RC2 until we upgrade to RC4.

@davideast what's the roadmap for upgrading to rc4?

Was this page helpful?
0 / 5 - 0 ratings