Comments (1)
Hello, I have the same issue.
From my research, this behaviour appeared in [email protected].
When I run this command :
$ npx nx affected:build --base="0000000000000000000000000000000000000000" --head="ba25f78f9628a757f1796feb00cd4dd4c2de2c68" --configuration="dev" || echo "Failed"
Output in [email protected]:
$ npx nx affected:build --base="0000000000000000000000000000000000000000" --head="ba25f78f9628a757f1796feb00cd4dd4c2de2c68" --configuration="dev" || echo "Failed"
fatal: bad object 0000000000000000000000000000000000000000
nx affected:build
Run command using --base=[SHA1] (affected by the committed, uncommitted and untracked changes):
--base Base of the current branch (usually main) [string]
or using --base=[SHA1] --head=[SHA2] (affected by the committed changes):
--base Base of the current branch (usually main) [string]
--head Latest commit of the current branch (usually HEAD) [string]
or using:
--files Change the way Nx is calculating the affected command by providing directly changed files, list of files delimited by commas or spaces [string]
--uncommitted Uncommitted changes [boolean]
--untracked Untracked changes [boolean]
Options:
--help Show help [boolean]
--version Show version number [boolean]
-c, --configuration This is the configuration to use when performing tasks on projects [string]
--output-style Defines how Nx emits outputs tasks logs [string] [choices: "dynamic", "static", "stream", "stream-without-prefixes"]
--exclude Exclude certain projects from being processed [string]
--parallel Max number of parallel processes [default is 3] [string]
--runner This is the name of the tasks runner configured in nx.json [string]
--graph Show the task graph of the command. Pass a file path to save the graph data instead of viewing it in the browser. [string]
--verbose Prints additional information about the commands (e.g., stack traces) [boolean]
--nxBail Stop command execution after the first failed task [boolean] [default: false]
--nxIgnoreCycles Ignore cycles in the task graph [boolean] [default: false]
--skipNxCache Rerun the tasks even when the results are available in the cache [boolean] [default: false]
Examples:
affected -t custom-target Run custom target for all affected projects
affected -t test --parallel=5 Run tests in parallel
affected -t lint test build Run lint, test, and build targets for affected projects. Requires Nx v15.4+
affected -t test --files=libs/mylib/src/index.ts Run tests for all the projects affected by changing the index.ts file
affected -t test --base=main --head=HEAD Run tests for all the projects affected by the changes between main and HEAD (e.g., PR)
affected -t test --base=main~1 --head=main Run tests for all the projects affected by the last commit on main
affected -t=build --exclude='*,!tag:dotnet' Run build for only projects with the tag `dotnet`
affected -t build --tag=$NX_TASK_TARGET_PROJECT:latest Use the currently executing project name in your command.
Find more information and examples at https://nx.dev/nx/affected
Error: Command failed: git diff --name-only --no-renames --relative "0000000000000000000000000000000000000000" "ba25f78f9628a757f1796feb00cd4dd4c2de2c68"
fatal: bad object 0000000000000000000000000000000000000000
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at parseGitOutput (/Users/baptistemahe/Documents/repos/unico-workspace/node_modules/nx/src/utils/command-line-utils.js:240:41)
at getFilesUsingBaseAndHead (/Users/baptistemahe/Documents/repos/unico-workspace/node_modules/nx/src/utils/command-line-utils.js:237:12)
at parseFiles (/Users/baptistemahe/Documents/repos/unico-workspace/node_modules/nx/src/utils/command-line-utils.js:191:20)
at getAffectedGraphNodes (/Users/baptistemahe/Documents/repos/unico-workspace/node_modules/nx/src/command-line/affected/affected.js:82:151)
at Object.affected (/Users/baptistemahe/Documents/repos/unico-workspace/node_modules/nx/src/command-line/affected/affected.js:34:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 128,
signal: null,
output: [
null,
<Buffer >,
<Buffer 66 61 74 61 6c 3a 20 62 61 64 20 6f 62 6a 65 63 74 20 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 ... 9 more bytes>
],
pid: 22116,
stdout: <Buffer >,
stderr: <Buffer 66 61 74 61 6c 3a 20 62 61 64 20 6f 62 6a 65 63 74 20 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 ... 9 more bytes>
}
Failed
Output in [email protected]:
$ npx nx affected:build --base="0000000000000000000000000000000000000000" --head="ba25f78f9628a757f1796feb00cd4dd4c2de2c68" --configuration="dev" || echo "Failed"
fatal: bad object 0000000000000000000000000000000000000000
NX Command failed: git diff --name-only --no-renames --relative "0000000000000000000000000000000000000000" "ba25f78f9628a757f1796feb00cd4dd4c2de2c68"
fatal: bad object 0000000000000000000000000000000000000000
Pass --verbose to see the stacktrace.
from nx.
Related Issues (20)
- eslint:convert-to-inferred did not find a project inside HOT 1
- @nx/vite:convert-to-inferred is looking outside the repo HOT 2
- `npx nx migrate latest` Failed to install the latest version of the migration script. Using the current version. HOT 6
- `run-commands` executor uses wrong working directory HOT 2
- Nx executes targets out of order when overriding target in `project.json`
- The Nx CLI could not find or load the native binary for your supported platform (darwin-arm64). HOT 1
- Angular 18 - angular material auto import in vscode not working
- @nx/webpack > sass-loader version too old
- tasks-runner component doesn't validate sock path HOT 4
- The Nx CLI could not find or load the native binary for your supported platform (win32-x64) HOT 4
- "serve-static" target leads to endless loop in angular application HOT 2
- 🐞 Angular buildable lib : `Can't find stylesheet to import`
- Remix recipe does not have `development` task HOT 1
- Production build (shell app) does not build remotes apps via host app build HOT 4
- release: too many authors in authors section HOT 1
- Generating a new library automatically edits nx.json by adding the nx-eslint plugin causing random performance issues HOT 3
- The following projects are defined in multiple locations (incorrectly triggered)
- nx-cloud start-ci-run unable to find dynamic-changesets.yaml HOT 1
- @nx/playwright ignoring --project argument
- Lerna (powered by Nx) Cannot read properties of undefined (reading 'projects') HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.