-
Notifications
You must be signed in to change notification settings - Fork 161
Deploy Now fails #41
Comments
Have any logs? Error messages? |
Also having the same issue. Builds fine for local host but repeatedly get the following error log when trying to deploy on Now: 18:59:49.561
Looked everywhere and can't find a fix so if anyone can help would be very grateful. |
I would really like to be able to deploy this to see what I am missing in my own project. Looking above, @james-cohen is getting the same error I was, and it happens whether or not you have committed your .env file to GIT (and typically, you shouldn't).
I couldn't figure out why Zeit was running build instead of now-build, or why zeit was expecting a .env file in the repo. I ended up working around this by removing the copy env command from build, and creating a "local-build" option that had it. |
@MattGyverLee can you elaborate on how you did the "local-build" option? |
TL;DR _ _ Looking for a minimal fix to the template, it turned out to be simpler than that as now was using now-build, so I submitted the pull request #58 with a fix. You need to fill in your now.json with @ variables and update Zeit's secrets with everything you might need (client and server) since .env is no longer copied to Zeit. The package.json now has:
And now.json has all my secrets, client and server. I realize the world fell apart in the meantime (I successfully presented my prototype based on grandstack last week to my team via Zeit Now with my fix), but so far no traction on my pull request. |
@johnymontana Can we close this based on #58 ? |
@MattGyverLee The build process has now moved on from the error above to reporting Missing Public Folder (I had ran now from the api directory as per Will Lyons youtube video). If I remove the now.json file and redeploy, should I override the "Output Directory" to prevent it defaulting to Public, or will the issue be resolved with the correct secrets listed? |
My edits have been merged into the main branch, so the template should build properly locally or with Now if the secrets are set. See package.json and now.json after #58 and compare it to what you have. As far as secrets, anything needed in your .env files must now be mentioned in your now.json, either given explicitly as in the paths, or by configuring Now secrets for secret credentials. At minimum you need to teach Now the secrets below to run the starter...basically anything in your now.json that is not included explicitly. Now seems to be encouraging the structure with an API folder and a UI folder now, just like the template. If build is complaining about missing folders, Without seeing your code, I don't think your current problem is related to secrets, it sounds more like a package.json config issue and a missing folder. |
Thank you for following up so promptly. I've re-downloaded and started from scratch and still encountering the same issue with Vercel/Now. Think I will skip this hosting part and carry on learning the graphql and react ui bits which is what I came here for anyway! |
If anyone else is reading this: |
@jonomacx Yes, I followed both, and there is a significant divergence between the video and the starter. |
Deploy is failing on Now
The text was updated successfully, but these errors were encountered: