Netlify build fails: “mkdir: command not found” and missing core utilities on all deploys

My Remix project fails to build on Netlify with errors like mkdir: command not found, touch: command not found, and mise: command not found. The build fails before dependencies are installed. This happens even on a brand new Netlify site, but a simple static “Hello World” deploys fine.

Details:

  • Repo: GitHub - AllenJame123/age-o-matic at new-main

  • No Dockerfile, .nvmrc, or .node-version in the repo.

  • package.json specifies “engines”: { “node”: “>=18.0.0” }

  • netlify.toml uses standard build commands, no custom image.

  • No custom build plugins enabled in the UI.

  • Tried creating a new Netlify site from scratch—same error.

  • Build log excerpt:

text

Apply

/opt/build-bin/run-build-functions.sh: line XX: mkdir: command not found

/opt/build-bin/run-build-functions.sh: line XX: touch: command not found

/opt/build-bin/run-build-functions.sh: line XX: mise: command not found

Error setting python version from 3.13

Failing build: Failed to install dependencies

  • A simple static site from a new repo works fine.

What I’ve tried:

  • Disabled all build plugins.

  • Created a new Netlify site from the same repo.

  • Checked for custom environment files and build settings.

  • Confirmed the issue is not present with a static site.

Request:

Can you help investigate why the build image is missing core Unix utilities for this project? Is there a way to reset or repair the build environment for my site?

Please link us to an example deploy.

Deploy log

Why did it fail?

Maximize log

Initializing

Failed

4:39:08 PM: build-image version: 0e04ecb664f5f97dc8ac7f3de278d0e6f81cd9c2 (noble)

4:39:08 PM: buildbot version: 0adda441a46f5fcbd50adabc3d352011c7a84c94

4:39:08 PM: Fetching cached dependencies

4:39:08 PM: Failed to fetch cache, continuing with build

4:39:08 PM: Starting to prepare the repo for build

4:39:08 PM: No cached dependencies found. Cloning fresh repo

4:39:08 PM: git clone --filter=blob:none GitHub - AllenJame123/age-o-matic

4:39:09 PM: Preparing Git Reference refs/heads/new-main

4:39:11 PM: Failed during stage ‘Install dependencies’: dependency_installation script returned non-zero exit code: 1

4:39:11 PM: Starting to install dependencies

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 41: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 42: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 43: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 45: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 46: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 47: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 48: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 49: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 50: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 53: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 54: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 57: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 58: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 59: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 60: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 61: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 62: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 63: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 64: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 65: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 66: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 1002: mkdir: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 1003: touch: command not found

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 1005: /opt/build/env_store/.env: No such file or directory

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 1006: /opt/build/env_store/.env: No such file or directory

4:39:11 PM: /opt/build-bin/run-build-functions.sh: line 464: mise: command not found

4:39:11 PM: Error setting python version from 3.13

4:39:11 PM: Failing build: Failed to install dependencies

Building

Complete

Deploying

Skipped

Cleanup

Skipped

Post-processing

Skipped

That’s really strange. I’ve asked the devs to check. Could you try creating a new site just to be sure?

now this error occurs. https://683d98894adab20008130139--jovial-alpaca-d4b03c.netlify.app/

An unhandled error in the function code triggered the following message:

Runtime.ImportModuleError - Error: Cannot find module ‘@remix-run/netlify’ Require stack: - /var/task/netlify/functions/server.js - /var/task/server.js - /var/runtime/index.mjs

Stack trace

Runtime.ImportModuleError: Error: Cannot find module '@remix-run/netlify'
Require stack:
- /var/task/netlify/functions/server.js
- /var/task/server.js
- /var/runtime/index.mjs
    at _loadUserApp (file:///var/runtime/index.mjs:1092:17)
    at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1131:21)
    at async start (file:///var/runtime/index.mjs:1300:23)
    at async file:///var/runtime/index.mjs:1306:1

Hi, @AllenJame123. It looks like there was some sort of issue with the build system itself. However, whatever was causing it is no longer occurring. If you see this again, though, please let us know.