Skip to content

AngularFirestoreModule causes Angular Server Side Rendering to fail. #2129

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
SauceCode84 opened this issue Jul 15, 2019 · 7 comments
Closed

Comments

@SauceCode84
Copy link

Version info

Angular:
v8.1

Firebase:
v6.3

AngularFire:
v5.2.1

Other (e.g. Ionic/Cordova, Node, browser, operating system):

How to reproduce these conditions

Adding AngularFirestoreModule to the project causes Angular Server Side Rendering to fail when running the serve command, i.e. npm run build:ssr - after the build.
It fails with the same error when running firebase serve or firebase deploy.

When the AngularFirestoreModule is removed from the application, however, the build and serve work.

Debug output

> [email protected] serve:ssr /home/richard/Code/fip-fight-club
> node dist/server

/home/richard/Code/fip-fight-club/dist/server/main.js:180715
        throw new Error("package.json does not exist at " + package_json_path);
        ^

Error: package.json does not exist at /home/richard/Code/fip-fight-club/dist/package.json
    at Object.PsoT.exports.find (/home/richard/Code/fip-fight-club/dist/server/main.js:180715:15)
    at Object.wPNL (/home/richard/Code/fip-fight-club/dist/server/main.js:256777:12)
    at __webpack_require__ (/home/richard/Code/fip-fight-club/dist/server/main.js:20:30)
    at Object.XpdW (/home/richard/Code/fip-fight-club/dist/server/main.js:197412:12)
    at __webpack_require__ (/home/richard/Code/fip-fight-club/dist/server/main.js:20:30)
    at Object.g1pB (/home/richard/Code/fip-fight-club/dist/server/main.js:214495:27)
    at __webpack_require__ (/home/richard/Code/fip-fight-club/dist/server/main.js:20:30)
    at Object.Ou8q (/home/richard/Code/fip-fight-club/dist/server/main.js:177412:14)
    at __webpack_require__ (/home/richard/Code/fip-fight-club/dist/server/main.js:20:30)
    at Object.BYZf (/home/richard/Code/fip-fight-club/dist/server/main.js:31994:12)

Expected behavior

Serve or deploy the application with Server Side Rendering functionality.

Actual behavior

Error in the console, as per above.

@jlmonteagudo
Copy link

I'm also fighting against this problem.

Does anyone have a clue? :)

@WUKS87
Copy link

WUKS87 commented Jul 18, 2019

@jlmonteagudo No solution for now. Please share this issue

@matheo
Copy link

matheo commented Aug 10, 2019

Use v5.1.3, see #2115

@marcjal
Copy link

marcjal commented Nov 8, 2019

The same problem here I'm using:

Angular: v8.2
Firebase: v7.3
AngularFire: v5.2.1

@WUKS87
Copy link

WUKS87 commented Nov 8, 2019

@marcjal Have you tried Angularfire v5.1.3?

@marcjal
Copy link

marcjal commented Nov 9, 2019

@WUKS87 Let me see that version I hadn’t tried yet. Thanks

@jamesdaniels
Copy link
Member

Closing as outdated.

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

6 participants