You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered this error when it's the final stages when the function is building.
Error: Could not find 'pages' directory , which is very vague and confusing, but after figuring out a lot of issues , I am perplexed why this is an issue.
There seems to be a mismatch somewhere as if you try to override this with anything else eg. build: next build src/ it will say this command will be ignored and firebase will use it's default and deploy will work.
BUT if it's build: next build, this doesn't get ignored, so I assume this means it must be matching firebase's build script, but the frustrating thing is that this will fail the deploy, and I do not know why for the life of me.
The text was updated successfully, but these errors were encountered:
atco-jh
changed the title
NextJS - If package.json build: next build firebase deploy will fail
NextJS - If package.json has build: next build firebase deploy will fail
Apr 27, 2023
The package.json cannot have the
build: next build
script or firebase function will fail to deploy. This is very reproducible and happens every time.example package.json
I've encountered this error when it's the final stages when the function is building.
Error: Could not find 'pages' directory
, which is very vague and confusing, but after figuring out a lot of issues , I am perplexed why this is an issue.I am using
src/pages
folder structure in NextJS.firebase.json
There seems to be a mismatch somewhere as if you try to override this with anything else eg.
build: next build src/
it will say this command will be ignored and firebase will use it's default and deploy will work.BUT if it's
build: next build
, this doesn't get ignored, so I assume this means it must be matching firebase's build script, but the frustrating thing is that this will fail the deploy, and I do not know why for the life of me.The text was updated successfully, but these errors were encountered: