It is self evident if you try to install this version or search on npmjs.com.
Yes please release it. We need it badly for our project. Thanks!!
@asadsahi @jwuliger There's an issue with AoT compilation that we are looking into. Rest assured we are working on it :)
@davideast Thanks David!
@davideast should angularfire 2 be worried about AoT right now when tooling like cli / official documentation doesn't give any clue to what AoT is? To most of us this is just a concept in the air right now.
@asadsahi Getting AoT working is not really a big deal even on a CLI made project, and I'm actually waiting for angularfire2 to work with AoT. Also the latest release isn't really a deal breaker, one could just use rxjs beta.10 until it's released, but AoT is something that should definitely work now that Angular 2.0.0 is released and I'm really glad they're working on it!
@ivoviz AoT definitely sounds good, its just frustration caused by last release of angularfire2 could be avoided by a subsequent release targeting AoT. Not sure if the priority was to fix critical issues than AoT.
@asadsahi Imo they just forgot to release initially and later on found an issue with AoT. Probably they'll fix it soon and then do a release. I understand your frustration, but the lib - with a small modification - still works, so I wouldn't really sweat it. Let's hope they'll do a release soon with AoT fixes though!
@asadsahi @ivoviz It's important that we try not to knowingly release bugs into production. Outside of the AoT issue we have some more testing to do as there were a fair amount of changes to our test setup from the RC7 upgrade.
We plan on cutting a next release soon, we'll let you know when it's out.
Hey folks, I've published a pre-release version of the package behind a tag. It includes some packaging changes introduced in #510 which haven't yet been merged into master. You can get it by npm install angularfire2@next.
I'd appreciate any feedback if there are issues with the new packaging.
Sorry for the inconvenience, I pushed the beta.5 tag to Github as I was preparing to do the release, and then ran into some build issues. As I was correcting the build issue, I wanted to take care of a couple of things to make AngularFire2 AoT-compile-friendly.
@jeffbcross Thanks! I've just tried it, it's still not working for AoT, but at least it's a new error now. Previously I had Could not resolve 'angularfire2' from .../src/app/app.module.js, now it's Could not resolve '_stream_writable' from .../node_modules/angularfire2/node_modules/firebase/database-node.js
Thanks, will look into it. We should add an AoT integration test (though
not necessarily block this release on it).
On Thu, Sep 15, 2016 at 5:51 PM John Smith [email protected] wrote:
@jeffbcross https://github.com/jeffbcross Thanks! I've just tried it,
it's still not working for AoT, but at least it's a new error now.
Previously I had Could not resolve 'angularfire2' from
.../src/app/app.module.js, now it's Could not resolve '_stream_writable'
from .../node_modules/angularfire2/node_modules/firebase/database-node.js—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire2/issues/511#issuecomment-247493648,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAcTV2q5jLE1EE5NEepMiQgGNMSJl_hQks5qqef0gaJpZM4J-QeS
.
Just to be sure I'm doing it right, my rollup config is something like this:
export default {
entry: 'src/main.js',
dest: 'dist/build.js',
sourceMap: false,
format: 'iife',
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: ['node_modules/rxjs/**', 'node_modules/angularfire2/**'],
}),
uglify()
]
}
@jeffbcross latest preview package has fixed https://github.com/angular/angularfire2/issues/496 at least :+1:
Here are my packages:
"angularfire2": "^2.0.0-beta.5-preview",
"firebase": "3.4.0",
"rxjs": "^5.0.0-beta.12",
"zone.js": "^0.6.23"
@jeffbcross It's just a wild guess, but it seems like it's trying to load the node version of firebase (firebase-node) instead of the browser one (firebase-browser).
@ivoviz Upgrading to Firebase 3.4.0 this might fix issue. Which we can do now that we're off SystemJS.
@davideast Doesn't seem to do the trick, at least for me. Upgraded firebase to 3.4.0 both in my app and in angularfire2 itself, but still the same error.
@ivoviz can you add browser: true to nodeResolve options like so?
nodeResolve({jsnext: true, module: true, browser: true})
^^^ that's because Firebase's package.json has a browser field pointing to the correct file for browser use. Rollup-plugin-node-resolve sets browser to false by default.
It also may be necessary to add firebase to the include of the commonjs plugin.
@jeffbcross Thanks for the tip! Adding browser: true gets me to a new error: Module .../node_modules/angularfire2/node_modules/firebase/firebase.js does not export initializeApp (imported by .../node_modules/angularfire2/angularfire2.js). Tried to add firebase to commonjs plugin, doesn't help.
@ivoviz can you share your complete configuration again?
rollup
import rollup from 'rollup';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
export default {
entry: 'src/main.js',
dest: 'dist/build.js', // output a single application bundle
sourceMap: false,
format: 'iife',
plugins: [
nodeResolve({ jsnext: true, module: true, browser: true }),
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/angularfire2/**',
'node_modules/firebase/**'
],
}),
uglify()
]
}
tsconfig
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"../node_modules/@types"
],
"types": [
"jasmine",
"firebase",
"hammerjs",
"core-js"
]
},
"files": [
"app/app.module.ts",
"main.ts",
"typings.d.ts"
],
"angularCompilerOptions": {
"genDir": "../aot",
"skipMetadataEmit" : true
}
}
Using angularfire2 next (or beta.5-preview)
@ivoviz could you try changing the commonjs firebase include line to node_modules/angularfire2/node_modules/firebase/**?
Same error sadly.
@davideast is there a change in packaging with 3.4.0 that might cause this issue?
Just fyi, I'm pretty sure it was happening with 3.3.0/3.3.2 as well.
@ivoviz could you share your whole project in a github repository so I could tinker with it?
Sent an invite, it's in the aot branch.
@ivoviz can you hop on Gitter?
TL;DR we worked around the rollup issue using namedExports, to work around rollup-commonjs plugin's lack of understanding re-exported symbols.
namedExports: {
'node_modules/firebase/firebase.js': ['initializeApp', 'auth', 'database']
}
https://github.com/rollup/rollup-plugin-commonjs/issues/35
In other news, I've pushed the latest release to npm at latest tag, so you can get it by installing angularfire2@latest or [email protected].
Where should I include the named exports?
I am having the same issue in Ionic 2 RC0....
Any help?
@jlsuarezs Read https://github.com/angular/angularfire2/issues/545#issuecomment-248712121, might help you out.
Thank you for your help @ivoviz !
But now I have I new issue:
rollup: Use of `eval` (in /Users/me/project/node_modules/angularfire2/node_modules/firebase/firebase.js) is strongly discouraged, as it poses security risks and may cause issues with minification. See https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval for more details
You can ignore that imo.
It's not building the bundle, so, I've removed the evals from firebase.js and now! No errors, but a new issue :S:
Uncaught TypeError: Cannot read property 'navigator' of undefined
It's because of the use strict mode, anyway to remove the strict mode only for firebase in the rollup config? :(
If I add the option: useStrict: false, to the rollup.config.js it works, but I think it's not the best option....
Any idea?
I have the same problem. Where did you put the useStrict: false option in rollup.config.js?
Ah, nevermind, just a little typo, now it works. Thanks!
Most helpful comment
@asadsahi Getting AoT working is not really a big deal even on a CLI made project, and I'm actually waiting for angularfire2 to work with AoT. Also the latest release isn't really a deal breaker, one could just use rxjs beta.10 until it's released, but AoT is something that should definitely work now that Angular 2.0.0 is released and I'm really glad they're working on it!