Skip to content

[rush] rush build with a file called "nul" in repo causes "Error calculating state of the repo" #5604

Description

@ccrook1138

Trying to run "npm run build" - these "nul" file are common artifacts left around by AI coding agents. Unfortunate, but hard to always avoid. Their mere presence as untracked files seem like a bad reason to just blow up.

Analyzing repo state... Error calculating the state of the repo. (inner error: Error: git --no-optional-locks exited with code 128:
fatal: could not open 'apps/admin-powerplatform-microsoft-com/nul' for reading: No such file or directory

at spawnGitAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@rushstack\package-deps-hash\lib\getRepoState.js:242:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async hashFilesAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@rushstack\package-deps-hash\lib\getRepoState.js:281:30)
at async getDetailedRepoStateAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@rushstack\package-deps-hash\lib\getRepoState.js:356:36)
at async Promise.all (index 0)
at async tryGetSnapshotAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@microsoft\rush-lib\dist\commons.js:23002:99)
at async C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@microsoft\rush-lib\dist\commons.js:21254:19
at async PhasedScriptAction._runInitialPhasesAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@microsoft\rush-lib\dist\commons.js:21245:59)
at async PhasedScriptAction.runAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@microsoft\rush-lib\dist\commons.js:21224:37)
at async PhasedScriptAction.onExecuteAsync (C:\_\power-platform-ux\common\temp\install-run\@[email protected]\node_modules\@microsoft\rush-lib\dist\commons.js:19674:9)). Continuing without diffing files.

DONE (1.02 seconds)

Everything worked fine after using Git Bash to remove the "nul" file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions