menu

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

Channels
Team

Problem with now.json

February 26, 2020 at 6:06am

Problem with now.json

February 26, 2020 at 6:06am

working on a nextjs project thats Project Structure like this.

Screenshot_4.png

But now i have facing problem with now.json script. here is my code

{
"version": 2,
"builds": [
{ "src": "/packages/next-app/package.json", "use": "@now/static-build" }
],
"routes": [
{
"src": "/(.*)",
"dest": "/packages/next-app/$1",
"headers": {
"x-request-path": "$1"
}
}
]
}

when i run now its deploy an empty directory like this:

Screenshot_3.png

Anybody can say where is the problem?

Thanks


February 26, 2020 at 6:57am

same problem i have

  • reply
  • like

February 26, 2020 at 5:04pm

i got the solution add this "now-build": "next build && next export -o dist" in your package.json

  • reply
  • like
private
This channel has been archived