#927·imba

Expected value for define "process.env.IMBA_GIT_HASH" to be a string, got undefined instead

Author: bodiamCreated May 26, 2026Updated Jul 2, 2026
Labelsbug

Description

Hi there,

I just created a fresh project using npx imba create. I'm using the Default template, though I had the same problem with any other template. When the project is created, I run npm run dev, and I'm getting this error:

/tmp via ☕ v17.0.6 on ☁️
❯ cd erik

/tmp/erik via  v25.2.1 on ☁️
❯ npm run dev

> dev
> imba -w index.html

cache dir does not exist - create /private/tmp/erik/node_modules/imba/.imba-cache
fatal: not a git repository (or any of the parent directories): .git
ℹ starting to build in /private/var/folders/zn/t9wdl_c963v65c61_qh0_tf80000gn/T/tmp-95832-LV3XobaSXB2H
✘ [ERROR] Expected value for define "process.env.IMBA_GIT_HASH" to be a string, got undefined instead

    /private/tmp/erik/node_modules/esbuild/lib/main.js:295:10:
      295 │     throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`);
          ╵           ^

    at validateStringValue (/private/tmp/erik/node_modules/esbuild/lib/main.js:295:11)
    at pushCommonFlags (/private/tmp/erik/node_modules/esbuild/lib/main.js:365:37)
    at flagsForBuildOptions (/private/tmp/erik/node_modules/esbuild/lib/main.js:393:3)
    at buildOrContextContinue (/private/tmp/erik/node_modules/esbuild/lib/main.js:913:9)
    at /private/tmp/erik/node_modules/esbuild/lib/main.js:887:11
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

× failed with 1 errors

I'm using the following:

/tmp/erik via  v25.2.1 on ☁️
❯ npm --version
11.14.1
❯ node --version
v25.2.1

Any help would be appreciated!

Reproduction

No response

System Environment

System:
    OS: macOS 26.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 119.89 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 25.2.1 - /opt/homebrew/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 11.14.1 - /opt/homebrew/bin/npm
    pnpm: 10.8.0 - /Users/erikpragt/Library/pnpm/pnpm
    Watchman: 2025.04.14.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 148.0.7778.168
    Firefox: 150.0.3
    Safari: 26.5
  npmPackages:
    imba: ^2.0.0-alpha.251 => 2.0.0-alpha.251