Open jirungaray opened 6 years ago
Getting the same problem with ngx-translate/core, according to this issue a fix would be to convert the package to es2015 using Babel: https://github.com/ngx-translate/core/issues/581
After using babel to convert the module to es2015 I tried to serve the application via "firebase serve --only functions,hosting". Although the error went gone a new error pops up without any useful info: Failed to emulate ssrapp
It is worth mentioning the same application does run via SSR via the built in Angular Universal Starter command: "npm run serve:ssr". So something strange seems to be going on.
I did some research and indeed the issue is because of node not supporting ES6, I re transpiled some libs and got it to go away. Unfortunately some other libs started failing because they are not SSR compatible. At this point i'm trying some final hacks before dropping angular, to be honest it doesn't seem to be production ready.
I've completed the setup and tried running the SSR locally, unfortunately whenever i try to hit localhost:5000 i get an error on the Firebase function:
Which from I can gather from my research is related to Node.js not supporting modern versions of ES and can be solved by including
var express = require("express");
Unfortunately that doesn't seem to fix the issue.The log is as follows: