Astro project will not deploy

Trying to deploy app through Github. I have read many posts here and in the help Docs on Netlify and Astro which talk about the proper build settings. I believe I have the correct ones but I am not sure as I have never deployed this way before.

Build Settings are :
Base = Master
Package = Master
Build command = astro build
Publish Directory = master/dist

I read an article saying these are the correct settings but I am not sure. I have no dist file in the repository but I am assuming that is auto generated by Netlify when deploying.

I built the template from terminal and pushed to Github through VSCode. Only thing I changed in the default template was some text in the index.astro this file is in the src/pages folder.

There is an astro.config.mjs file but has only three lines of code:

import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({});

Site name: What2print.netlify.app
Github: GitHub - jel111/What2print: A site for easily finding what to print. One model every week on tuesday.

By the way I see in the failed attempt it says there is no Master file but there is one as it is shown in the Github repository.
I have no logs to post but took a screenshot of the failed attempt.

The reason for the error is evident in the screenshot you posted

This comes from these setting

Both base and package settings are incorrect as the code exists at the root of the repository and not in a directory called master.

1 Like

@jel111 As some additional information.

Checking the Build configuration documentation you’ll see that Base directory has this explanation:

  • Base directory: directory where Netlify checks for dependency management files such as package.json or .nvmrc, installs dependencies, and runs your build command. The build system will use this directory to perform caching during the build process. If not set, the base directory defaults to the root of the repository.

You’ve input the name of your repository branch into a field intended for a directory.

As @dig has outlined, (and the documentation quoted mentions), you don’t need to specify a Base directory if it’s the root of your repository.

2 Likes

Thanks a bunch!
By removing master and leaving the field empty it built and deployed. I don’t know why that is so confusing to me.
In the docs they just mention the build and the publish settings and I was wondering why. It might be a good idea to say the other two should be empty if one deploys a default template. You know in case a dumdum like me comes along again. Highly unlikely I know but just in case. LOL

1 Like