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
FIX deploy with-firebase-hosting #3946
Changes from 1 commit
959e3cd
e481c9a
6873588
9708b1f
9542da8
c08afdd
41fa10c
30a6877
79e7aff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
"dev": "next src/app", | ||
"serve": | ||
"echo \"for details see:\n\thttps://github.com/firebase/firebase-tools/issues/535 \n\thttps://github.com/zeit/next.js/issues/3167\";", | ||
"deploy": "firebase deploy", | ||
"predeploy": "mkdir -p \"dist/functions\"", | ||
"deploy": "cd \"dist/functions\" && firebase deploy", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and this shouldn't be required either because https://github.com/zeit/next.js/blob/76582b8e437dadc4dce18ec6ee525acb6f0d2cdb/examples/with-firebase-hosting/firebase.json#L13 should be picked up on And moving dir might mess up the deployment step of any hosting or db parts of the deployment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why...but this doesn't work for me... |
||
"clean": "rimraf \"dist/functions\" && rimraf \"dist/public\"", | ||
"build-public": "cpx \"src/public/**/*.*\" \"dist/public\" -C", | ||
"build-funcs": "babel \"src/functions\" --out-dir \"dist/functions\"", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need this as
build-funcs
will create this when run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but we must run
firebase deploy
indist/functions
for fix the problem. If i runyarn clean
and aftercd \"dist/functions\" && firebase deploy
, we have an error becausedist/functions
not exists.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It errors because after you
cd
intodist/functions
firebase deploy
tries to deploy a directory calleddist/functions
which doesn't exist from the relative directory ofdist/functions
.firebase deploy
knows to deploydist/functions
from https://github.com/zeit/next.js/pull/3946/files#diff-0bde36a03f5abc11a925591823b9d3c2R13