I deployed to app engine with nodejs8 runtime and got a 500. Im deploying a next.js application, and upon reviewing StackDriver I get. It appears .next might be getting ignored.
I've just managed to make it work. Here's what I found:
First of all, it doesn't work with Yarn. It seems gcp-build
command does not run when there is yarn.lock
file.
Now in package.json
, use following scripts:
"scripts": {
"gcp-build": "next build",
"start": "next start -p $PORT"
}
And make sure to declare Next and all modules needed in next.config.js
as dependencies (not devDependencies)
FYI I only have runtime: nodejs10
in my app.yaml
and only scripts I have are in pages
folder and next.config.js