Deploy fail - Exit Code: 1 & non- exit code:2

Hello

Complete rookie here, trying to deploy my first site built in while doing a course. I’m having no luck in deploying the site and I am such a beginner that I have absolutely no idea how to troubleshoot this. I have looked on this forum and it seems to be a common problem but the response/solutions are so advanced that I do’t understand them. Please speak to me like a 3 year old if you have the time and patience to help me.

Here is part of the deploy log. I’m guessing that my work is full of holes and I should just toss it and start over. Thanks to anyone who takes the time to attempt to help me. It is appreciated.

8:47:27 PM: ────────────────────────────────────────────────────────────────

8:47:27 PM: 1. Build command from Netlify app

8:47:27 PM: ────────────────────────────────────────────────────────────────

8:47:27 PM: ​

8:47:27 PM: $ parcel build index.html

8:47:29 PM: :rotating_light: /opt/build/repo/css/styles.css:undefined:undefined: ENOENT: no such file or directory, open ‘/opt/build/repo/css/styles.css’

8:47:29 PM: Error: ENOENT: no such file or directory, open ‘/opt/build/repo/css/styles.css’

8:47:29 PM: ​

8:47:29 PM: ────────────────────────────────────────────────────────────────

8:47:29 PM: “build.command” failed

8:47:29 PM: ────────────────────────────────────────────────────────────────

8:47:29 PM: ​

8:47:29 PM: Error message

8:47:29 PM: Command failed with exit code 1: parcel build index.html (Search results for '"non-zero exit code: 1"' - Netlify Support Forums)

8:47:29 PM: ​

8:47:29 PM: Error location

8:47:29 PM: In Build command from Netlify app:

8:47:29 PM: parcel build index.html

8:47:29 PM: ​

8:47:29 PM: Resolved config

8:47:29 PM: build:

8:47:29 PM: command: parcel build index.html

8:47:29 PM: commandOrigin: ui

8:47:29 PM: publish: /opt/build/repo/dist

8:47:29 PM: publishOrigin: ui

8:47:30 PM: Caching artifacts

8:47:30 PM: Started saving node modules

8:47:30 PM: Finished saving node modules

8:47:30 PM: Started saving build plugins

8:47:30 PM: Finished saving build plugins

8:47:30 PM: Started saving pip cache

8:47:30 PM: Finished saving pip cache

8:47:30 PM: Started saving emacs cask dependencies

8:47:30 PM: Finished saving emacs cask dependencies

8:47:30 PM: Started saving maven dependencies

8:47:30 PM: Finished saving maven dependencies

8:47:30 PM: Started saving boot dependencies

8:47:30 PM: Finished saving boot dependencies

8:47:30 PM: Started saving rust rustup cache

8:47:30 PM: Finished saving rust rustup cache

8:47:30 PM: Started saving go dependencies

8:47:30 PM: Finished saving go dependencies

8:47:31 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

8:47:31 PM: Creating deploy upload records

8:47:32 PM: Failing build: Failed to build site

8:47:32 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)

8:47:32 PM: Finished processing build request in 20.64662283s

Hi @jace178

This line explains it all: the file does not exist.

Can you share the public repository you are trying to deploy.

Hello @coelmay

Thanks for the reply. Here is the link to the repository.

Thanks for taking the time to look into this for me. Apperciated!

Thanks @jace178

The reason the file isn’t found in this instance is because of case sensitivity. This is because in GitHub (an possibly your local machine) the css directory is CSS. Changing the directory name to css will solve this issue.

@colemay
Thanks a lot. I’ve been struggling with how to change the CSS directory name. Not as straight forward as I thought it would be. I found a a way to do it in git and I think that was what auto-triggered one of my deploy attempts to be successful but I’m not sure. I tried to recreate that deploy but still had some errors. I’m going to try again later as I need to be sure of the successful process. I’ll let you know if I make any progress. Thanks again. I appreciate the help.