NX Passed 11161 file paths to Git to hash, but received 11148 hashes.
See original GitHub issueCurrent Behavior
This is effectively a re-open of : https://github.com/nrwl/nx/issues/8779
After upgrading
- node from 14.16.1 to 16.14.2
- npm from 6.14.12 to 8.5.0
- nx from 13.8.0 to 13.10.3
I have frequent builds on my Jenkins builds failing with errors like
> NX Passed 11161 file paths to Git to hash, but received 11148 hashes.
Expected Behavior
- The hashing should log the error returned from
git hash-object
e.g.fatal: Cannot open 'xxxx': No such file or directory
- If the hashing fails builds should not fail - i.e. the build should proceed nx caching disabled
Steps to Reproduce
Have not seen the pattern that causes these errors to occur The proposed improvement in “Expected Behaviour” will not solve the problem but will
- provide more info that could make it possibly solve the error - e.g. from https://github.com/nrwl/nx/issues/8779 one solved the problem by adding a directory with temporary files to
.gitignore
and this might also be a solution to my problem, but which directory ?? - mitigate the effect of the problem by allowing the build to complete albeit without caching
Failure Logs
Environment
NX Report complete - copy this into the issue template
Node : 16.14.2
OS : darwin x64
npm : 8.5.0
nx : 13.10.3
@nrwl/angular : 13.9.5
@nrwl/cypress : 13.9.5
@nrwl/detox : Not Found
@nrwl/devkit : 13.9.5
@nrwl/eslint-plugin-nx : 13.9.5
@nrwl/express : Not Found
@nrwl/jest : 13.9.5
@nrwl/js : Not Found
@nrwl/linter : 13.9.5
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 13.2.1
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 13.9.5
@nrwl/web : Not Found
@nrwl/workspace : 13.9.5
typescript : 4.5.5
rxjs : 6.6.7
---------------------------------------
Community plugins:
@ngrx/component-store: 13.0.2
@ngrx/store: 13.0.2
@ngx-matomo/tracker: 2.4.1
apollo-angular: 2.6.0
@compodoc/compodoc: 1.1.19
@storybook/angular: 6.4.22
@testing-library/angular: 10.11.1
ng-mocks: 13.4.2
nx-stylelint: 12.3.1
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Git: Getting a file's path at a given commit hash - Stack Overflow
The real problem here is that each commit is a complete, but independent, snapshot of all of your files: Commit 9620e34 has one...
Read more >git-hash-object Documentation - Git
Computes the object ID value for an object with specified type with the contents of the named file (which can be outside of...
Read more >https://huggingface.co/recobo/chemical-bert-uncase...
diff --git a/tokenizer.json b/tokenizer.json new file mode 100644--- /dev/null +++ b/tokenizer.json @@ -0,0 +1 @@ +{"version":"1.0" ...
Read more >R: doc/NEWS.2 - Fossies
This means that the device does NOT 899 create a PDF file (but it can ... 2770 2771 • list2env(envir = NULL) defaults...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think you have to run git hash-object and add the folder with the error to .gitignore.
thank you! I found out that the error happens as soon as I generate files outside the Nx scope (in my case a build from pkg) that’s recognized by git. As soon as I add these files to .gitignore the problem is fixed.