Can't launch Deploy Next.js from the dashboard

javascript
nextjs

#1

i’m trying to set up a test with Next.js and I can’t get it to deploy to heroku or now.sh.
As there are no specific logs, I can’t figure out what’s going wrong.
Has anyone else had a similar issue? If so, how did you get around it?

-Many Thanks


#2

Hi @rpgio

I’m in the process of updating the link on the Dashboard to use now.sh instead of Heroku.

The next build isn’t triggered on upload which is causing the issue with Heroku.

You can go here and deploy it to now.sh

:slight_smile:


#3

I seem to be running into the same issue. For my stripe key, should I be using the public or private keys?


#4

I’ve tried every combination of Zeit API keys, Moltin Client ID / Secret, and Stripe keys (and validated all of these accounts with the provider). However, all deployment attempts come back with “Deploy failed, please check the repo and try again.”

There isn’t anything else to go on from the Now.sh side of things, so I’m stuck. What do I do from here? Can you validate that Now.sh is still working for you with a deployment of the current Moltin Github build?

This is the link I’ve been using:
https://deploy.now.sh/?repo=https://github.com/moltin-examples/nextjs-demo-store&env=MOLTIN_CLIENT_ID&env=STRIPE_KEY


#5

Looks like there might be something wrong with the build out there on GitHub…

When deploying locally, the following stack trace occurs:
Cannot read property ‘main_images’ of undefined
TypeError: Cannot read property ‘main_images’ of undefined
at Object.main_images (/Users/rob/CodeWork/nextjs-demo-store/pages/index.js:13:37)


#6

Hi @rpgio

Sorry about the confusion, you’ll want to use the STRIPE_PUBLISHABLE_KEY. I’ve updated the repo to reflect this change.

Edit: Sorry. Publishable key!

I’ve also gone ahead and made a small change with main_image destructuring. Can you try to clone the GitHub repo and try to deploy using the now CLI?

I hope this helps :smile:


#7

As it turns out, the issue was that there were no products in my inventory. The server was throwing errors when it didn’t find any products as opposed to returning no products found.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.