functions-samples icon indicating copy to clipboard operation
functions-samples copied to clipboard

Couldn't find a `pages` directory

Open nazacity opened this issue 5 years ago • 4 comments

I just cloned your code and run exactly what you descript to see how it works but when I run yarn serve

"Couldn't find a pages directory. Please create one under the project root" this came out

nazacity avatar May 31 '20 10:05 nazacity

@nazacity please let us know what sample you used and what steps you took before yarn serve.

jhuleatt avatar Jun 01 '20 16:06 jhuleatt

I followed nextjs-with-firebase-hosting

nazacity avatar Jun 01 '20 16:06 nazacity

Error: > Couldn't find a pages directory. Please create one under the project root

xxxxxxxxxxx123 avatar Jul 01 '20 21:07 xxxxxxxxxxx123

the issue is distDir in next.config.js. You can't have dist outside project directory which currently is ../funcitons/next. I suggest to build inside project directory and then copy to functions directory

kresli avatar Aug 01 '20 10:08 kresli