Deploying with postcss fails

Hi, first time with Netlify. Looks great, hope to get over my initial deploy problems.

Site name limoncello.netlify.app

It’s an 1ty app. Attempting to integrate postcss with the build.

packages in package.json:

 "dependencies": {
   "@11ty/eleventy": "^0.11.1"
},
"devDependencies": {
  "alpinejs": "^2.8.0",
  "autoprefixer": "^10.2.4",
  "postcss": "^8.2.4",
  "tailwindcss": "^2.0.2"
  }
}

Latest error log:

2:32:57 PM: Build ready to start
2:32:59 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
2:32:59 PM: build-image tag: v3.6.1
2:32:59 PM: buildbot version: a0f5a242397f47e25a65cd8b1de9758023166a1b
2:32:59 PM: Fetching cached dependencies
2:32:59 PM: Starting to download cache of 89.9MB
2:33:00 PM: Finished downloading cache in 548.707625ms
2:33:00 PM: Starting to extract cache
2:33:03 PM: Finished extracting cache in 3.272072001s
2:33:03 PM: Finished fetching cache in 3.850019604s
2:33:03 PM: Starting to prepare the repo for build
2:33:04 PM: Preparing Git Reference refs/heads/main
2:33:06 PM: Starting build script
2:33:06 PM: Installing dependencies
2:33:06 PM: Python version set to 2.7
2:33:06 PM: Started restoring cached node version
2:33:09 PM: Finished restoring cached node version
2:33:10 PM: v12.18.0 is already installed.
2:33:10 PM: Now using node v12.18.0 (npm v6.14.4)
2:33:10 PM: Started restoring cached build plugins
2:33:10 PM: Finished restoring cached build plugins
2:33:11 PM: Attempting ruby version 2.7.1, read from environment
2:33:12 PM: Using ruby version 2.7.1
2:33:12 PM: Using PHP version 5.6
2:33:12 PM: Started restoring cached node modules
2:33:12 PM: Finished restoring cached node modules
2:33:13 PM: Installing NPM modules using NPM version 6.14.4
2:33:16 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
2:33:16 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
2:33:16 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:33:16 PM: npm WARN limoncello@1.0.0 No description
2:33:16 PM: npm WARN limoncello@1.0.0 No repository field.
2:33:16 PM: audited 437 packages in 2.451s
2:33:16 PM: 19 packages are looking for funding
2:33:16 PM:   run `npm fund` for details
2:33:16 PM: found 0 vulnerabilities
2:33:16 PM: NPM modules installed
2:33:16 PM: Started restoring cached go cache
2:33:16 PM: Finished restoring cached go cache
2:33:17 PM: go version go1.14.4 linux/amd64
2:33:17 PM: go version go1.14.4 linux/amd64
2:33:17 PM: Installing missing commands
2:33:17 PM: Verify run directory
2:33:18 PM: ​
2:33:18 PM: ────────────────────────────────────────────────────────────────
2:33:18 PM:   Netlify Build                                                 
2:33:18 PM: ────────────────────────────────────────────────────────────────
2:33:18 PM: ​
2:33:18 PM: ❯ Version
2:33:18 PM:   @netlify/build 8.3.4
2:33:18 PM: ​
2:33:18 PM: ❯ Flags
2:33:18 PM:   deployId: 6018576989af2118046564eb
2:33:18 PM:   mode: buildbot
2:33:18 PM: ​
2:33:18 PM: ❯ Current directory
2:33:18 PM:   /opt/build/repo
2:33:18 PM: ​
2:33:18 PM: ❯ Config file
2:33:18 PM:   No config file was defined: using default values.
2:33:18 PM: ​
2:33:18 PM: ❯ Context
2:33:18 PM:   production
2:33:18 PM: ​
2:33:18 PM: ────────────────────────────────────────────────────────────────
2:33:18 PM:   1. Build command from Netlify app                             
2:33:18 PM: ────────────────────────────────────────────────────────────────
2:33:18 PM: ​
2:33:18 PM: $ npm run build
2:33:19 PM: > limoncello@1.0.0 build /opt/build/repo
2:33:19 PM: > ELEVENTY_PRODUCTION=true eleventy & NODE_ENV=production postcss src/css/style.css --o _site/style.css
2:33:19 PM: sh: 1: postcss: not found
2:33:19 PM: npm ERR! code ELIFECYCLE
2:33:19 PM: npm ERR! syscall spawn
2:33:19 PM: npm ERR! file sh
2:33:19 PM: npm ERR! errno ENOENT
2:33:19 PM: npm ERR! limoncello@1.0.0 build: `ELEVENTY_PRODUCTION=true eleventy & NODE_ENV=production postcss src/css/style.css --o _site/style.css`
2:33:19 PM: npm ERR! spawn ENOENT
2:33:19 PM: npm ERR!
2:33:19 PM: npm ERR! Failed at the limoncello@1.0.0 build script.
2:33:19 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:33:19 PM: npm ERR! A complete log of this run can be found in:
2:33:19 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-02-01T19_33_19_164Z-debug.log
2:33:19 PM: ​
2:33:19 PM: ────────────────────────────────────────────────────────────────
2:33:19 PM:   "build.command" failed                                        
2:33:19 PM: ────────────────────────────────────────────────────────────────
2:33:19 PM: ​
2:33:19 PM:   Error message
2:33:19 PM:   Command failed with exit code 1: npm run build
2:33:19 PM: ​
2:33:19 PM:   Error location
2:33:19 PM:   In Build command from Netlify app:
2:33:19 PM:   npm run build
2:33:19 PM: ​
2:33:19 PM:   Resolved config
2:33:19 PM:   build:
2:33:19 PM:     command: npm run build
2:33:19 PM:     commandOrigin: ui
2:33:19 PM:     publish: /opt/build/repo/_site
2:33:19 PM: Caching artifacts
2:33:19 PM: Started saving node modules
2:33:19 PM: Finished saving node modules
2:33:19 PM: Started saving build plugins
2:33:19 PM: Eleventy fatal error: (more in DEBUG output)
2:33:19 PM: > Cannot find module '../internal/debug'
2:33:19 PM: Require stack:
2:33:19 PM: - /opt/build/repo/node_modules/semver/classes/semver.js
2:33:19 PM: - /opt/build/repo/node_modules/semver/index.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/UserConfig.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/EleventyConfig.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Config.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateEngineManager.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/EleventyExtensionMap.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateRender.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateData.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:33:19 PM: - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:33:19 PM: `Error` was thrown:
2:33:19 PM:     Error: Cannot find module '../internal/debug'
2:33:19 PM:     Require stack:
2:33:19 PM:     - /opt/build/repo/node_modules/semver/classes/semver.js
2:33:19 PM:     - /opt/build/repo/node_modules/semver/index.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/UserConfig.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/EleventyConfig.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateConfig.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Config.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateEngineManager.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/EleventyExtensionMap.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateRender.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateData.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:33:19 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:33:19 PM:         at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
2:33:19 PM:         at Function.Module._load (internal/modules/cjs/loader.js:842:27)
2:33:19 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:33:19 PM:         at require (internal/modules/cjs/helpers.js:72:18)
2:33:19 PM:         at Object.<anonymous> (/opt/build/repo/node_modules/semver/classes/semver.js:1:15)
2:33:19 PM:         at Module._compile (internal/modules/cjs/loader.js:1138:30)
2:33:19 PM:         at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2:33:19 PM:         at Module.load (internal/modules/cjs/loader.js:986:32)
2:33:19 PM:         at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2:33:19 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:33:19 PM: Finished saving build plugins
2:33:19 PM: Started saving pip cache
2:33:19 PM: Finished saving pip cache
2:33:19 PM: Started saving emacs cask dependencies
2:33:19 PM: Finished saving emacs cask dependencies
2:33:19 PM: Started saving maven dependencies
2:33:19 PM: Finished saving maven dependencies
2:33:19 PM: Started saving boot dependencies
2:33:19 PM: Finished saving boot dependencies
2:33:19 PM: Started saving rust rustup cache
2:33:19 PM: Finished saving rust rustup cache
2:33:19 PM: Started saving go dependencies
2:33:19 PM: Finished saving go dependencies
2:33:19 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:33:19 PM: Failing build: Failed to build site
2:33:19 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:33:19 PM: Finished processing build request in 19.943672691s

non-update - I thought perhaps moving postcss into dependencies would clear it up, but no. I also created a netlify-specific build script, removing local environment overrides. Still no love.

2:48:09 PM: Build ready to start
2:48:10 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
2:48:10 PM: build-image tag: v3.6.1
2:48:10 PM: buildbot version: a0f5a242397f47e25a65cd8b1de9758023166a1b
2:48:10 PM: Fetching cached dependencies
2:48:10 PM: Starting to download cache of 89.9MB
2:48:11 PM: Finished downloading cache in 503.941001ms
2:48:11 PM: Starting to extract cache
2:48:14 PM: Finished extracting cache in 2.729469254s
2:48:14 PM: Finished fetching cache in 3.272323261s
2:48:14 PM: Starting to prepare the repo for build
2:48:14 PM: Preparing Git Reference refs/heads/main
2:48:16 PM: Starting build script
2:48:16 PM: Installing dependencies
2:48:16 PM: Python version set to 2.7
2:48:17 PM: Started restoring cached node version
2:48:19 PM: Finished restoring cached node version
2:48:20 PM: v12.18.0 is already installed.
2:48:21 PM: Now using node v12.18.0 (npm v6.14.4)
2:48:21 PM: Started restoring cached build plugins
2:48:21 PM: Finished restoring cached build plugins
2:48:21 PM: Attempting ruby version 2.7.1, read from environment
2:48:22 PM: Using ruby version 2.7.1
2:48:22 PM: Using PHP version 5.6
2:48:22 PM: Started restoring cached node modules
2:48:22 PM: Finished restoring cached node modules
2:48:23 PM: Installing NPM modules using NPM version 6.14.4
2:48:25 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
2:48:25 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
2:48:25 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:48:25 PM: npm WARN limoncello@1.0.0 No description
2:48:25 PM: npm WARN limoncello@1.0.0 No repository field.
2:48:25 PM: audited 437 packages in 2.018s
2:48:26 PM: 19 packages are looking for funding
2:48:26 PM:   run `npm fund` for details
2:48:26 PM: found 0 vulnerabilities
2:48:26 PM: NPM modules installed
2:48:26 PM: Started restoring cached go cache
2:48:26 PM: Finished restoring cached go cache
2:48:26 PM: go version go1.14.4 linux/amd64
2:48:26 PM: go version go1.14.4 linux/amd64
2:48:26 PM: Installing missing commands
2:48:26 PM: Verify run directory
2:48:27 PM: ​
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM:   Netlify Build                                                 
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM: ​
2:48:27 PM: ❯ Version
2:48:27 PM:   @netlify/build 8.3.4
2:48:27 PM: ​
2:48:27 PM: ❯ Flags
2:48:27 PM:   deployId: 60185af92160cd0007bdd210
2:48:27 PM:   mode: buildbot
2:48:27 PM: ​
2:48:27 PM: ❯ Current directory
2:48:27 PM:   /opt/build/repo
2:48:27 PM: ​
2:48:27 PM: ❯ Config file
2:48:27 PM:   No config file was defined: using default values.
2:48:27 PM: ​
2:48:27 PM: ❯ Context
2:48:27 PM:   production
2:48:27 PM: ​
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM:   1. Build command from Netlify app                             
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM: ​
2:48:27 PM: $ npm run buildnetlify
2:48:28 PM: > limoncello@1.0.0 buildnetlify /opt/build/repo
2:48:28 PM: > eleventy & postcss src/css/style.css --o _site/style.css
2:48:28 PM: sh: 1: postcss: not found
2:48:28 PM: npm ERR! code ELIFECYCLE
2:48:28 PM: npm ERR! syscall spawn
2:48:28 PM: npm ERR! file sh
2:48:28 PM: npm ERR! errno ENOENT
2:48:28 PM: npm ERR! limoncello@1.0.0 buildnetlify: `eleventy & postcss src/css/style.css --o _site/style.css`
2:48:28 PM: npm ERR! spawn ENOENT
2:48:28 PM: npm ERR!
2:48:28 PM: npm ERR! Failed at the limoncello@1.0.0 buildnetlify script.
2:48:28 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:48:28 PM: npm ERR! A complete log of this run can be found in:
2:48:28 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-02-01T19_48_28_327Z-debug.log
2:48:28 PM: ​
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM:   "build.command" failed                                        
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM: ​
2:48:28 PM:   Error message
2:48:28 PM:   Command failed with exit code 1: npm run buildnetlify
2:48:28 PM: ​
2:48:28 PM:   Error location
2:48:28 PM:   In Build command from Netlify app:
2:48:28 PM:   npm run buildnetlify
2:48:28 PM: ​
2:48:28 PM:   Resolved config
2:48:28 PM:   build:
2:48:28 PM:     command: npm run buildnetlify
2:48:28 PM:     commandOrigin: ui
2:48:28 PM:     publish: /opt/build/repo/_site
2:48:28 PM: Caching artifacts
2:48:28 PM: Started saving node modules
2:48:28 PM: Finished saving node modules
2:48:28 PM: Started saving build plugins
2:48:28 PM: Eleventy fatal error: (more in DEBUG output)
2:48:28 PM: > Cannot find module './common'
2:48:28 PM: Require stack:
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/lib/js-yaml.js
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/index.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/lib/engines.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/lib/defaults.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/index.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Template.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:48:28 PM: `Error` was thrown:
2:48:28 PM:     Error: Cannot find module './common'
2:48:28 PM:     Require stack:
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/lib/js-yaml.js
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/index.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/lib/engines.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/lib/defaults.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/index.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Template.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:48:28 PM:         at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
2:48:28 PM:         at Function.Module._load (internal/modules/cjs/loader.js:842:27)
2:48:28 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:48:28 PM:         at require (internal/modules/cjs/helpers.js:72:18)
2:48:28 PM:         at Object.<anonymous> (/opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js:5:27)
2:48:28 PM:         at Module._compile (internal/modules/cjs/loader.js:1138:30)
2:48:28 PM:         at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2:48:28 PM:         at Module.load (internal/modules/cjs/loader.js:986:32)
2:48:28 PM:         at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2:48:28 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:48:28 PM: Finished saving build plugins
2:48:28 PM: Started saving pip cache
2:48:28 PM: Finished saving pip cache
2:48:28 PM: Started saving emacs cask dependencies
2:48:28 PM: Finished saving emacs cask dependencies
2:48:28 PM: Started saving maven dependencies
2:48:28 PM: Finished saving maven dependencies
2:48:28 PM: Started saving boot dependencies
2:48:28 PM: Finished saving boot dependencies
2:48:28 PM: Started saving rust rustup cache
2:48:28 PM: Finished saving rust rustup cache
2:48:28 PM: Started saving go dependencies
2:48:28 PM: Finished saving go dependencies
2:48:28 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:48:28 PM: Failing build: Failed to build site
2:48:28 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:48:28 PM: Finished processing build request in 18.121582235s2:48:09 PM: Build ready to start
2:48:10 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
2:48:10 PM: build-image tag: v3.6.1
2:48:10 PM: buildbot version: a0f5a242397f47e25a65cd8b1de9758023166a1b
2:48:10 PM: Fetching cached dependencies
2:48:10 PM: Starting to download cache of 89.9MB
2:48:11 PM: Finished downloading cache in 503.941001ms
2:48:11 PM: Starting to extract cache
2:48:14 PM: Finished extracting cache in 2.729469254s
2:48:14 PM: Finished fetching cache in 3.272323261s
2:48:14 PM: Starting to prepare the repo for build
2:48:14 PM: Preparing Git Reference refs/heads/main
2:48:16 PM: Starting build script
2:48:16 PM: Installing dependencies
2:48:16 PM: Python version set to 2.7
2:48:17 PM: Started restoring cached node version
2:48:19 PM: Finished restoring cached node version
2:48:20 PM: v12.18.0 is already installed.
2:48:21 PM: Now using node v12.18.0 (npm v6.14.4)
2:48:21 PM: Started restoring cached build plugins
2:48:21 PM: Finished restoring cached build plugins
2:48:21 PM: Attempting ruby version 2.7.1, read from environment
2:48:22 PM: Using ruby version 2.7.1
2:48:22 PM: Using PHP version 5.6
2:48:22 PM: Started restoring cached node modules
2:48:22 PM: Finished restoring cached node modules
2:48:23 PM: Installing NPM modules using NPM version 6.14.4
2:48:25 PM: npm notice created a lockfile as package-lock.json. You should commit this file.
2:48:25 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
2:48:25 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:48:25 PM: npm WARN limoncello@1.0.0 No description
2:48:25 PM: npm WARN limoncello@1.0.0 No repository field.
2:48:25 PM: audited 437 packages in 2.018s
2:48:26 PM: 19 packages are looking for funding
2:48:26 PM:   run `npm fund` for details
2:48:26 PM: found 0 vulnerabilities
2:48:26 PM: NPM modules installed
2:48:26 PM: Started restoring cached go cache
2:48:26 PM: Finished restoring cached go cache
2:48:26 PM: go version go1.14.4 linux/amd64
2:48:26 PM: go version go1.14.4 linux/amd64
2:48:26 PM: Installing missing commands
2:48:26 PM: Verify run directory
2:48:27 PM: ​
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM:   Netlify Build                                                 
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM: ​
2:48:27 PM: ❯ Version
2:48:27 PM:   @netlify/build 8.3.4
2:48:27 PM: ​
2:48:27 PM: ❯ Flags
2:48:27 PM:   deployId: 60185af92160cd0007bdd210
2:48:27 PM:   mode: buildbot
2:48:27 PM: ​
2:48:27 PM: ❯ Current directory
2:48:27 PM:   /opt/build/repo
2:48:27 PM: ​
2:48:27 PM: ❯ Config file
2:48:27 PM:   No config file was defined: using default values.
2:48:27 PM: ​
2:48:27 PM: ❯ Context
2:48:27 PM:   production
2:48:27 PM: ​
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM:   1. Build command from Netlify app                             
2:48:27 PM: ────────────────────────────────────────────────────────────────
2:48:27 PM: ​
2:48:27 PM: $ npm run buildnetlify
2:48:28 PM: > limoncello@1.0.0 buildnetlify /opt/build/repo
2:48:28 PM: > eleventy & postcss src/css/style.css --o _site/style.css
2:48:28 PM: sh: 1: postcss: not found
2:48:28 PM: npm ERR! code ELIFECYCLE
2:48:28 PM: npm ERR! syscall spawn
2:48:28 PM: npm ERR! file sh
2:48:28 PM: npm ERR! errno ENOENT
2:48:28 PM: npm ERR! limoncello@1.0.0 buildnetlify: `eleventy & postcss src/css/style.css --o _site/style.css`
2:48:28 PM: npm ERR! spawn ENOENT
2:48:28 PM: npm ERR!
2:48:28 PM: npm ERR! Failed at the limoncello@1.0.0 buildnetlify script.
2:48:28 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:48:28 PM: npm ERR! A complete log of this run can be found in:
2:48:28 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-02-01T19_48_28_327Z-debug.log
2:48:28 PM: ​
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM:   "build.command" failed                                        
2:48:28 PM: ────────────────────────────────────────────────────────────────
2:48:28 PM: ​
2:48:28 PM:   Error message
2:48:28 PM:   Command failed with exit code 1: npm run buildnetlify
2:48:28 PM: ​
2:48:28 PM:   Error location
2:48:28 PM:   In Build command from Netlify app:
2:48:28 PM:   npm run buildnetlify
2:48:28 PM: ​
2:48:28 PM:   Resolved config
2:48:28 PM:   build:
2:48:28 PM:     command: npm run buildnetlify
2:48:28 PM:     commandOrigin: ui
2:48:28 PM:     publish: /opt/build/repo/_site
2:48:28 PM: Caching artifacts
2:48:28 PM: Started saving node modules
2:48:28 PM: Finished saving node modules
2:48:28 PM: Started saving build plugins
2:48:28 PM: Eleventy fatal error: (more in DEBUG output)
2:48:28 PM: > Cannot find module './common'
2:48:28 PM: Require stack:
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/lib/js-yaml.js
2:48:28 PM: - /opt/build/repo/node_modules/js-yaml/index.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/lib/engines.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/lib/defaults.js
2:48:28 PM: - /opt/build/repo/node_modules/gray-matter/index.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Template.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:48:28 PM: - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:48:28 PM: `Error` was thrown:
2:48:28 PM:     Error: Cannot find module './common'
2:48:28 PM:     Require stack:
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/lib/js-yaml.js
2:48:28 PM:     - /opt/build/repo/node_modules/js-yaml/index.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/lib/engines.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/lib/defaults.js
2:48:28 PM:     - /opt/build/repo/node_modules/gray-matter/index.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateContent.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Template.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/TemplateWriter.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/src/Eleventy.js
2:48:28 PM:     - /opt/build/repo/node_modules/@11ty/eleventy/cmd.js
2:48:28 PM:         at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
2:48:28 PM:         at Function.Module._load (internal/modules/cjs/loader.js:842:27)
2:48:28 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:48:28 PM:         at require (internal/modules/cjs/helpers.js:72:18)
2:48:28 PM:         at Object.<anonymous> (/opt/build/repo/node_modules/js-yaml/lib/js-yaml/loader.js:5:27)
2:48:28 PM:         at Module._compile (internal/modules/cjs/loader.js:1138:30)
2:48:28 PM:         at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
2:48:28 PM:         at Module.load (internal/modules/cjs/loader.js:986:32)
2:48:28 PM:         at Function.Module._load (internal/modules/cjs/loader.js:879:14)
2:48:28 PM:         at Module.require (internal/modules/cjs/loader.js:1026:19)
2:48:28 PM: Finished saving build plugins
2:48:28 PM: Started saving pip cache
2:48:28 PM: Finished saving pip cache
2:48:28 PM: Started saving emacs cask dependencies
2:48:28 PM: Finished saving emacs cask dependencies
2:48:28 PM: Started saving maven dependencies
2:48:28 PM: Finished saving maven dependencies
2:48:28 PM: Started saving boot dependencies
2:48:28 PM: Finished saving boot dependencies
2:48:28 PM: Started saving rust rustup cache
2:48:28 PM: Finished saving rust rustup cache
2:48:28 PM: Started saving go dependencies
2:48:28 PM: Finished saving go dependencies
2:48:28 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:48:28 PM: Failing build: Failed to build site
2:48:28 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:48:28 PM: Finished processing build request in 18.121582235s

Definitely postcss. separated out the commands for ease of use:

"scripts": {
    "start": "eleventy --serve & postcss src/css/style.css --o _tmp/style.css --watch",
    "build": "ELEVENTY_PRODUCTION=true eleventy && NODE_ENV=production postcss src/css/style.css --o _site/style.css",
    "buildnetlify": "npm-run-all build:eleventy build:postcss",
    "build:eleventy": "eleventy",
    "build:postcss": "postcss src/css/style.css --o _site/style.css"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@11ty/eleventy": "^0.11.1",
    "npm-run-all": "^4.1.5",
    "postcss": "^8.2.4"
  },
  "devDependencies": {
    "alpinejs": "^2.8.0",
    "autoprefixer": "^10.2.4",
    "tailwindcss": "^2.0.2"
  }

and logs.

....
3:15:18 PM: $ npm run buildnetlify
3:15:19 PM: > limoncello@1.0.0 buildnetlify /opt/build/repo
3:15:19 PM: > npm-run-all build:eleventy build:postcss
3:15:19 PM: > limoncello@1.0.0 build:eleventy /opt/build/repo
3:15:19 PM: > eleventy
3:15:19 PM: Writing _site/index.html from ./src/index.njk.
3:15:19 PM: Copied 1 file / Wrote 1 file in 0.07 seconds (v0.11.1)
3:15:20 PM: > limoncello@1.0.0 build:postcss /opt/build/repo
3:15:20 PM: > postcss src/css/style.css --o _site/style.css
3:15:20 PM: sh: 1: postcss: not found
....

Hiya!

Try adding postcss-cli as a dependency. :blush:

2 Likes

somehow that should have been obvious, right? :wink:

Thanks!

1 Like