403 error
If the deployment of your site completes without error, but you see a 403 error when trying to visit the site in your browser, here are a few things to check:- If your site depends on a build step, is the Build command (Settings > Basic details) filled in and correct?
- Is the Publish directory correct?
- Are your file permissions* correct? We generally recommend the following permissions for static sites:
- Directories: 755
- Files: 644
- Read: See the contents of a file or view files in a directory.
- Write: Modify a file, or add or delete files in a directory.
- Execute: Run a file and/or execute it as a script, or access a directory and perform functions and commands.
404 error
If the deployment of your site completes without error, but you see a 404 error when trying to visit the site in your browser, there are a few things to check:- If your site depends on a build step, is the Build command (Settings > Basic details) filled in and correct?
- Is the Publish directory correct?
- Is your repository compatible with Static Site Hosting? It should contain either:
- A static site framework that uses Node.js for the build step.
- Or static files, such as HTML, CSS, and Javascript, that do not require a build step (leave the Build command blank).
Incorrect Node version
If you enter a build command for your site, you can select the Node version to use. If you select the incorrect version, the deployment will fail, and there will be an error in the deployment logs that indicates a different Node.js version is needed, similar to this:Unable to determine package manager
If an issue occurs with the build command or configuration file, you may see the following error:Error: Unable to determine package managerThis error usually occurs due to an incorrect build command or a missing or incorrectly configured package.json file. Here are a couple of things to check:
- Is the Build command (Settings > Basic details) filled in and correct?
- Is the package.json file in your git repository?
- Is the package.json file configured correctly, including any conflicting Node version? For instance, you may have chosen Node version 18.16.0 when you added the static site, but in the package.json file, you may have set the Node version to something different, like the following example: