paralect / nextjs-landing-starter

Build your landing site based on Next.JS in minutes 🚀
https://github.com/paralect/nextjs-landing-starter
MIT License
61 stars 14 forks source link

Error while Deploying the app into Zeit Now #44

Closed frederikocmr closed 4 years ago

frederikocmr commented 4 years ago

While trying to deploy the app using Zeit Now, this error occurs:

16:16:23.308  > Build error occurred
16:16:23.309  Error: Cannot use publicRuntimeConfig with target=serverless https://err.sh/zeit/next.js/serverless-publicRuntimeConfig
16:16:23.309      at loadConfig (/zeit/372a6349/node_modules/next-server/dist/server/config.js:95:19)
16:16:23.309      at build (/zeit/372a6349/node_modules/next/dist/build/index.js:1:5892)
16:16:23.317  Error: Exited with 1
16:16:23.317      at ChildProcess.<anonymous> (/zeit/f8b3553cce6cf4b4/.build-utils/node_modules/@now/build-utils/dist/index.js:31349:24)
16:16:23.317      at ChildProcess.emit (events.js:223:5)
16:16:23.317      at ChildProcess.EventEmitter.emit (domain.js:475:20)
16:16:23.317      at maybeClose (internal/child_process.js:1021:16)
16:16:23.317      at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
jqueryisamonad commented 4 years ago

Sorry, but you can't deploy this starter with ZEIT Now because we host the application on our own nodejs server.

ZEIT Now is a cloud platform for static sites and Serverless Functions

frederikocmr commented 4 years ago

Ok I am sorry for that! But in this case, which platform you recommend for me to deploy the app? @hovoodd

jqueryisamonad commented 4 years ago

@frederikocmr Do you plan to use nextjs-landing-starter together with koa-api-starte and koa-react-starter?

frederikocmr commented 4 years ago

@hovoodd No. I just want to use this as standalone app. Initially only for consuming an API.

jqueryisamonad commented 4 years ago

@frederikocmr In this case I can recommend using a pure next.js. It would be easier than changing this starter. The nextjs-landing-starter was designed to work together with koa-api-starter and koa-react-starter. And there's a lot of code for that.

If you use pure next.js, you will get much less code without an unnecessary server (less is more 😄) and there will be no problems with deploying on ZEIT Now.

frederikocmr commented 4 years ago

@hovoodd Thank you so much! But in this case, I really liked how the structure is based, like the layout and stuff related. I will try to imitate it then and start from a new project! Thank you so much! I will close this issue!