Command failed with exit code 254: npm run build; Unable to find package.json

I’ve found a few solutions for this but none seem to have helped. I’m trying to deploy my first Vite site (paws-and-palaces, https://paws-and-palaces.netlify.app/), but I keep getting a 254 exit code. I was somehow able to deploy it once, but another was automatically ran and failed right after (image below). I’ve tried to change the package directory to paws-and-palaces and blank but neither have worked. Any other tips you may have to help me?

Deploys: Netlify App
Repo: GitHub - hotkiss1011/paws-and-palaces

@hotkiss1011 I’m not sure what you mean by the package directory but checking your repository it’s clear that the source code is in the paws-and-palaces directory, so you should set that as your Base directory in your Build settings.

As it says in the documentation for Base directory:

If not set, the base directory defaults to the root of the repository.

1 Like

Thank you, that worked. I just updated my base directory. Package directory is right underneath that in build settings.

1 Like

Glad you got your site working!

Shows how much attention I actually pay, I can’t remember ever even seeing that before.