Skip to content

Angular 7 SSR fails #1977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
harshithmullapudi opened this issue Dec 19, 2018 · 4 comments
Closed

Angular 7 SSR fails #1977

harshithmullapudi opened this issue Dec 19, 2018 · 4 comments

Comments

@harshithmullapudi
Copy link

harshithmullapudi commented Dec 19, 2018

Version info

Angular: 7.1.0

Firebase:5.7.0

AngularFire:5.1.1

How to reproduce these conditions

Clone the angular universal 7 repo install firebase and angular fire and do the build process

Steps to set up and reproduce

  1. Clone the repo https://github.com/enten/angular-universal
  2. Install firebase
  3. Install angular fire
  4. run npm start

Debug output

** Errors in the JavaScript console **

D:\harshith\my-project\node_modules\@angular\fire\bundles\messaging.umd.js:23
                var requireMessaging = rxjs.from(import('firebase/messaging'));
                                                 ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.@angular/fire/messaging (D:\harshith\my-project\dist\app\server\main.js:20508:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./dist/app/server/main.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\harsh\AppData\Roaming\npm-cache\_logs\2018-12-19T10_52_54_129Z-debug.log

** Output from firebase.database().enableLogging(true); **

** Screenshots **

Expected behavior

the server should start

Actual behavior

It's showing this error

@JeMeister
Copy link

I'm facing the same issue. Please help with this error.

@jamesdaniels
Copy link
Member

I'll work on changing that in the node package, in the meantime don't include AngularFireMessaging in your server app module only browser.

@jamesdaniels
Copy link
Member

Dup #1938

@muthufmass
Copy link

When can we expect an fix for this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants