Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to overwrite Output Directory to deploy on Vercel #23

Closed
vcidst opened this issue Feb 17, 2022 · 5 comments
Closed

Need to overwrite Output Directory to deploy on Vercel #23

vcidst opened this issue Feb 17, 2022 · 5 comments
Assignees

Comments

@vcidst
Copy link

vcidst commented Feb 17, 2022

When I forked and tried to deploy without making any changes, I got the following error

Error: The file "/vercel/path0/.next/routes-manifest.json" couldn't be found. This is normally caused by a misconfiguration in your project.

Please check the following, and reach out to support if you cannot resolve the problem:

1. If present, be sure your `build` script in "package.json" calls `next build`.  
2. Navigate to your project's settings in the Vercel dashboard, and verify that the "Build Command" is not overridden, or that it calls `next build`.  
3. Navigate to your project's settings in the Vercel dashboard, and verify that the "Output Directory" is not overridden. Note that `next export` does **not** require you change this setting, even if you customize the `next export` output directory. Learn More: https://err.sh/vercel/vercel/now-next-routes-manifest</span>

I had to change the "Output Directory" to "build" in project settings on Vercel dashboard to deploy it successfully. I'm not familiar with next.js ecosystem but I realized this is defined in next.config.js.

If this is something non-standard, can we add this bit to the readme?

@jamland
Copy link
Contributor

jamland commented Feb 17, 2022

Hi! I suppose this is something related to vercel deployment settings rather than this repo code.
I usually set the same settings I use locally when settings up new app on vercel. Check Build and Output Settings section personally I always set it like this and it works for me

image

@jamland
Copy link
Contributor

jamland commented Feb 17, 2022

if this is helpful I can add it to README ofc

@jamland jamland self-assigned this Feb 17, 2022
@vcidst
Copy link
Author

vcidst commented Feb 17, 2022

Yes, that would be helpful. I wasn't aware of these configurations. I found out the fix from this Vercel error note, specifically the point 2.

These settings worked for me,

@jamland
Copy link
Contributor

jamland commented Feb 17, 2022

cool! I will add note

@jamland jamland closed this as completed Feb 17, 2022
@johncanero
Copy link

Thank you for this @vcidst !! It worked in my deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants