-
Notifications
You must be signed in to change notification settings - Fork 86
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
Deployment fails with: Deploy directory 'out' does not exist - when trying to deploy "serverless" #211
Comments
UPDATE: If I create a netlify.toml and add the following to it:
I seem to be finally getting the netlify-plugin-nextjs to run but then I get the following error:
NOTE: This installs @netlify/plugin-nextjs@3.0.3 Build script in package.json:
|
@madze hey! unfortunately i'll need:
with an error like that, i can almost guarantee it's unique to your setup so those things will help a lot! and with that error in particular, it seems like perhaps you have your own |
@lindsaylevine - Thanks for the reply! For some reason when the error occurred I was fixated on the "out" directory part of it (I think because of the first issue I was coming up against), but after reading your note about an existing html.file I realized that I had migrated this project over from a gatsby.js project and reused the existing public directory and of course the culprit was right there - I had just missed it when I gutted that directory of extraneous files. I figured it had to probably be something silly that I was missing, especially because of the lack of results when I searched that error on the web. At any rate, if anyone else happens upon a similar corner case as this, maybe this will help them as well. Also btw, after deleting that file I was able to remove the Thanks a bunch! I'll go ahead and close this ticket. |
@madze of course always happy to help!! thanks for letting me/everyone know what you discovered! ❤️ |
* copying over mtime changes * initial test changes * update fetch-handler test * added utime func * update fetch-handler test * test change * adding utime for local testing * small test update --------- Co-authored-by: Rob Stanford <me@robstanford.com>
Describe the bug
Attempting to use the new one-click install Next.js feature (though this actually happens even if I install the plugin directly both via netlify.toml as well as in the UI).
I receive an error during deployment:
However, I do have target set to "serverless" in the next.config.js and do not want to use
next export
because I have an api route that should use the netlify serverless functions.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The site to deploy using serverless functions for SSR and the next API route.
Versions
Additional notes:
The only solution I've been able to find when searching this error is to use
next export
to deploy a static site but then of course our api routes don't work.It seems that perhaps the site just isn't being built as "serverless" for some reason...?
Here's the next.config.js:
Or perhaps I need to setup my netlify account differently somehow?
Any help would be greatly appreciated!
Thanks!
The text was updated successfully, but these errors were encountered: