kurttheviking / git-rev-sync-js

Synchronously get the current git commit hash, tag, or branch
MIT License
170 stars 57 forks source link

Error when using git.short and git.branch #70

Open whaaaley opened 1 year ago

whaaaley commented 1 year ago

TypeError: Cannot read properties of undefined (reading 'filename')

Node version v19.0.0

This could be an error relating to module system. I'm using ESM imports.

wkl007 commented 1 year ago

I have the same problem please help us thanks a lot

whaaaley commented 1 year ago

@wkl007 the project "async-git" seems to do the same job without errors

wkl007 commented 1 year ago

@whaaaley useful, thank you very much, i love you 😘

NikitaVr commented 1 year ago

same issue here, using ESM as well

Juicetan commented 7 months ago

i got the error too when simply invoking git.branch()... however when i passed in a path git.branch('./') it worked fine.