Skip to content

bug: after upgraded to v26.1.0, macOS build will throw Error: ENOTDIR: not a directory, open '<path/to/project>/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json' error #9310

@nekomeowww

Description

@nekomeowww

Summary

After upgraded to v26.1.0, build will throw the following error:

  ⨯ dependency tree output file is empty, retrying  error=Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-

Full log:

DEBUG='*' pnpm -F @proj-airi/stage-tamagotchi exec electron-builder --mac
  corepack Reusing pnpm@10.18.2 +0ms
  • electron-builder  version=26.1.0 os=24.5.0
  • artifacts will be published if draft release exists  reason=CI detected
  • loaded configuration  file=/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/electron-builder.yml
  • effective config  config=directories:
  output: dist
  buildResources: build
appId: ai.moeru.airi
productName: AIRI
files:
  - filter:
      - '!**/.vscode/*'
      - '!src/*'
      - '!electron.vite.config.{js,ts,mjs,cjs}'
      - '!vite.config.{js,ts,mjs,cjs}'
      - '!uno.config.{js,ts,mjs,cjs}'
      - '!{.eslintcache,eslint.config.ts,.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
      - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
      - '!{tsconfig.json}'
asarUnpack:
  - resources/**
win:
  executableName: AIRI
nsis:
  artifactName: ${productName}-${version}-windows-${arch}-setup.${ext}
  shortcutName: ${productName}
  uninstallDisplayName: ${productName}
  createDesktopShortcut: always
  deleteAppDataOnUninstall: true
mac:
  entitlementsInherit: build/entitlements.mac.plist
  extendInfo:
    - NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
    - NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
  notarize: false
  executableName: AIRI
dmg:
  artifactName: ${productName}-${version}-darwin-${arch}.${ext}
linux:
  target:
    - AppImage
  maintainer: moeru.ai
  category: Utility
  executableName: AIRI
  artifactName: ${productName}-${version}-linux-${arch}.${ext}
appImage:
  artifactName: ${productName}-${version}-linux-${arch}.${ext}
npmRebuild: false
publish:
  provider: generic
  url: https://example.com/auto-updates

  • writing effective config  file=dist/builder-effective-config.yaml
  • no event listeners found  event=beforePack
  • skipped dependencies rebuild  reason=npmRebuild is set to false
  • packaging       platform=darwin arch=arm64 electron=38.2.2 appOutDir=dist/mac-arm64
  • no custom electronDist provided, unpacking default Electron distribution
  • spawning        command=/Users/neko/Git/moeru-ai/airi/node_modules/.pnpm/app-builder-bin@5.0.0-alpha.12/node_modules/app-builder-bin/mac/app-builder_arm64 unpack-electron --configuration [{"platform":"darwin","arch":"arm64","version":"38.2.2"}] --output /Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64 --distMacOsAppName Electron.app
  • map async       taskCount=2
  • map async       taskCount=1
  • map async       taskCount=585
  • exited          command=app-builder_arm64 code=0 pid=43882
  • no event listeners found  event=afterExtract
  ⨯ dependency tree output file is empty, retrying  error=Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async mapWorkspaces (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js:109:15)
    at async Config.loadLocalPrefix (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:707:28)
    at async Config.loadProjectConfig (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:638:5)
    at async Config.load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:282:5)
    at async #load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/npm.js:195:5)
    at async module.exports (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/cli-entry.js:40:5)

                                                      tempOutputFile=/private/var/folders/m0/k_38ftb53yg0mqbcrrjypr3m0000gn/T/t-QPtfet/npm-0-output.json
  ⨯ dependency tree output file is empty, retrying  error=Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async mapWorkspaces (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js:109:15)
    at async Config.loadLocalPrefix (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:707:28)
    at async Config.loadProjectConfig (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:638:5)
    at async Config.load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:282:5)
    at async #load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/npm.js:195:5)
    at async module.exports (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/cli-entry.js:40:5)

                                                      tempOutputFile=/private/var/folders/m0/k_38ftb53yg0mqbcrrjypr3m0000gn/T/t-QPtfet/npm-0-output.json
  • async task error  error=Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async mapWorkspaces (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js:109:15)
    at async Config.loadLocalPrefix (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:707:28)
    at async Config.loadProjectConfig (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:638:5)
    at async Config.load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:282:5)
    at async #load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/npm.js:195:5)
    at async module.exports (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/cli-entry.js:40:5)

  ⨯ Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async mapWorkspaces (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js:109:15)
    at async Config.loadLocalPrefix (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:707:28)
    at async Config.loadProjectConfig (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:638:5)
    at async Config.load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:282:5)
    at async #load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/npm.js:195:5)
    at async module.exports (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/cli-entry.js:40:5)
  failedTask=build stackTrace=Error: Process exited with code 236:
Error: ENOTDIR: not a directory, open '/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi/dist/mac-arm64/Electron.app/Contents/Frameworks/Electron Framework.framework/Electron Framework/package.json'
    at async open (node:internal/fs/promises:642:25)
    at async readFile (node:internal/fs/promises:1279:14)
    at async mapWorkspaces (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js:109:15)
    at async Config.loadLocalPrefix (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:707:28)
    at async Config.loadProjectConfig (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:638:5)
    at async Config.load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:282:5)
    at async #load (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/npm.js:195:5)
    at async module.exports (/Users/neko/.volta/tools/image/node/21.6.2/lib/node_modules/npm/lib/cli-entry.js:40:5)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        at ChildProcess.<anonymous> (/Users/neko/Git/moeru-ai/airi/node_modules/.pnpm/app-builder-lib@26.1.0_dmg-builder@26.1.0_electron-builder-squirrel-windows@25.1.8/node_modules/app-builder-lib/src/node-module-collector/nodeModulesCollector.ts:218:25)
    at ChildProcess.emit (node:events:508:28)
    at maybeClose (node:internal/child_process:1101:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
/Users/neko/Git/moeru-ai/airi/apps/stage-tamagotchi:
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 1: electron-builder --mac

System information

  System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M1 Pro
    Memory: 77.03 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 23.8.0 - /Users/neko/.volta/tools/image/node/23.8.0/bin/node
    Yarn: 1.22.19 - /Users/neko/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.9.2 - /Users/neko/.volta/tools/image/node/23.8.0/bin/npm
    pnpm: 10.18.2 - /Users/neko/.volta/bin/pnpm
    bun: 1.2.22 - /opt/homebrew/bin/bun
    Deno: 2.4.5 - /opt/homebrew/bin/deno
  Browsers:
    Chrome: 141.0.7390.66
    Firefox: 141.0
    Safari: 18.5

I don't know how to debug electron-builder exactly to identify where is calling the @npmcli/config that causes this error, are there any valuable documentation provides instruction? I would like to help on this.

Rolling back to v26.0.20 will not have any issue though.

Compare: v26.0.20...master

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions