So I’ve deployed quite a few Frontity projects so far and this is a new error to me:
Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings. Learn More: https://vercel.link/missing-public-directory
I’ve never had to specify the output directory before but I tried to make it build
this time and that didn’t change the issue. I also made sure to use the same version of node in Vercel and locally. I reinstalled packages many times. I’m just kind of at a loss as to what could possibly be going wrong.
The only thing I can think of is that the Frontity project is located inside a directory of the original project, which was a React project, and that that React project’s settings in the parent folder are affecting the Frontity project. I’ll experiment with that later but I don’t really get why running npx vercel
specifically inside the directory I want to deploy would go up a directory to get settings etc. Here’s the repository in case you want to help out:
1 Like
Hi @david1
Can you specify the steps you’re following to deploy your Frontity project?
Hey @juanma ,
Thanks for getting back to me. I’ve actually re-organized the project so the Frontity files are in the root directory of the repository. I installed the necessary dependencies and checked that I can run npx frontity dev
locally.
Then here is what I did to deploy the site:
- Ran
vercel
in the root directory.
- Followed the steps to connect it to a project I had set up in Vercel already.
- The project has no overrides so once connected, Vercel uploads the files and runs the build.
- Then I get the following error:
Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings. Learn More: https://vercel.link/missing-public-directory
As far as I know, this is how I deployed at least 3 Frontity projects before without issue. I did notice that the Frontity project I created today and moved the package and frontity-settings.js
file into didn’t have a .gitignore
file. I’m not sure if that’s right or not and I had to manually add one that ignored node_modules
, which I don’t remember doing before. I noticed that Gitlab was also tracking my project’s build directory, which doesn’t seem right, and I wonder if that has anything to do with it.
Could you try to deploy this project to Vercel and let me know if it works for you?
OK, sorry to bother y’all with this but I figured out I forgot to add the vercel.json
file to my project. It’d been a while since I deployed a project and I thought I remembered it correctly but that was a crucial step that I missed.
1 Like