AbhyudayaSharma / react-git-info

Get Git commit information in your React App

Home Page:https://www.npmjs.com/package/react-git-info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build at Heroku fails with "not a git repository"

paulorsbrito opened this issue · comments

I tryed to deploy a release in Heroku, and ended with error "not a git repository" when build react app. It seams that heroku builds the project in another folder than where it has pulled from the repository (in this case /tmp/build_546350ec).

There's a workaround for this?

remote:        Creating an optimized production build...        
remote: fatal: not a git repository (or any parent up to mount point /)        
remote: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).        
remote:        Failed to compile.        
remote:                
remote:        Error: /tmp/build_546350ec/frontend/src/components/layout/footer.tsx: Command failed: git log --format=%D%n%h%n%H%n%cI%n%B -n 1 HEAD --        
remote:        fatal: not a git repository (or any parent up to mount point /)        
remote:        Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).        
remote:            at transformFile.next (<anonymous>)        
remote:            at run.next (<anonymous>)        
remote:            at transform.next (<anonymous>)        
remote:                
remote:                
remote: error Command failed with exit code 1.        
remote:        info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.        
remote: error Command failed.        
remote: Exit code: 1        
remote: Command: /tmp/build_546350ec/.heroku/node/bin/node        
remote: Arguments: /tmp/build_546350ec/.heroku/yarn/lib/cli.js build        
remote: Directory: /tmp/build_546350ec/frontend        

Hi! This library requires the git history to be present (.git directory). Without it, we cannot extract information. Please check if it is possible to clone with .git on Heroku.