Trouble with build, tailwind

Trouble with build, tailwind

Message Deleted

Hello. I’m fairly new to netlify. I’ve deployed a few angular projects, but that’s it. I’m building a simple static site for a client with htmx, native js, and tailwind. When I try to deploy the site on netlify (from github) the build fails. My site’s name is: andrew-a-alderete. I get this error from the netlify build:

8:04:05 PM: Netlify Build                                                 
8:04:05 PM: ────────────────────────────────────────────────────────────────
8:04:05 PM: ​
8:04:05 PM: ❯ Version
8:04:05 PM:   @netlify/build 29.51.3
8:04:05 PM: ​
8:04:05 PM: ❯ Flags
8:04:05 PM:   baseRelDir: true
8:04:05 PM:   buildId: 66a83bedf33962000821d7e1
8:04:05 PM:   deployId: 66a83bedf33962000821d7e3
8:04:05 PM: ​
8:04:05 PM: ❯ Current directory
8:04:05 PM:   /opt/build/repo/src
8:04:05 PM: ​
8:04:05 PM: ❯ Config file
8:04:05 PM:   No config file was defined: using default values.
8:04:05 PM: ​
8:04:05 PM: ❯ Context
8:04:05 PM:   production
8:04:05 PM: ​
8:04:05 PM: Build command from Netlify app                                
8:04:05 PM: ────────────────────────────────────────────────────────────────
8:04:05 PM: ​
8:04:05 PM: $ npm run build
8:04:05 PM: > aaa_realty@1.0.0 build
8:04:05 PM: > CI='' npx tailwindcss -i ./src/input.css -o ./src/output.css --minify
8:04:06 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
8:04:06 PM: sh: 1: tailwindcss: Permission denied
8:04:06 PM: ​
8:04:06 PM: "build.command" failed                                        
8:04:06 PM: ────────────────────────────────────────────────────────────────
8:04:06 PM: ​
8:04:06 PM:   Error message
8:04:06 PM:   Command failed with exit code 126: npm run build (https://ntl.fyi/exit-code-126)
8:04:06 PM: ​
8:04:06 PM:   Error location
8:04:06 PM:   In Build command from Netlify app:
8:04:06 PM:   npm run build
8:04:06 PM: ​
8:04:06 PM:   Resolved config
8:04:06 PM:   build:
8:04:06 PM:     base: /opt/build/repo/src
8:04:06 PM:     command: npm run build
8:04:06 PM:     commandOrigin: ui
8:04:06 PM:     publish: /opt/build/repo/src
8:04:06 PM:     publishOrigin: ui
8:04:06 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
8:04:06 PM: Failing build: Failed to build site
8:04:07 PM: Finished processing build request in 11.708s

Here is my package.json:

{
  "name": "aaa_realty",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "build": "CI='' npx tailwindcss -i ./src/input.css -o ./src/output.css --minify",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "tailwindcss": "^3.4.6"
  }
}

Here is my file structure:

Thank you for whatever advice you have to offer!

Have you comitted node_modules to your repo?

Yes. I have committed it, and pushed it up to github.

@QualityWebDev As you were going to bed last night, I asked the same in your other deleted thread:

The reason is, you don’t want to do that.

Remove it from your repository, and use your .gitignore file to ensure it doesn’t go in again.

Thank you! I will. You’ve been very obliging.