question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fatal: not a git repository (or any of the parent directories): .git

See original GitHub issue

Hi. I’m trying to use Cabin (in the canonical example in Bree), and every time I try to run the script I get the fatal: not a git repository (or any of the parent directories): .git error on the console.

Even if I strip it down to a bare example, it does the same thing:

const Cabin = require('cabin');
const cabin = new Cabin();
cabin.info("checkoutUser");
console.info("checkoutUser")
❯ node src/jobs/userStories/checkoutUser.js
fatal: not a git repository (or any of the parent directories): .git
checkoutUser {
  app: {
    name: '',
    version: '',
    node: 'v12.22.3',
    hash: undefined,
    environment: 'development',
    hostname: 'dangayle.local',
    pid: 18583,
    cluster: { isMaster: true, isWorker: false, schedulingPolicy: 2 },
    os: {
      arch: 'x64',
      cpus: [Array],
      endianness: 'LE',
      freemem: 39235584,
      priority: 0,
      homedir: '/Users/dangayle',
      hostname: 'dangayle.local',
      loadavg: [Array],
      network_interfaces: [Object],
      platform: 'darwin',
      release: '20.6.0',
      tmpdir: '/var/folders/8h/l9zr6dvn7f5cty6vk5vkzqrm0000gn/T',
      totalmem: 68719476736,
      type: 'Darwin',
      uptime: 671585,
      user: [Object]
    },
    worker_threads: {
      isMainThread: true,
      resourceLimits: {},
      threadId: 0,
      workerData: null
    }
  }
}
checkoutUser

package.json

{
  "dependencies": {
    "@ladjs/graceful": "^1.0.5",
    "@playwright/test": "^1.13.0",
    "bree": "^6.2.1",
    "cabin": "^9.0.4",
    "dayjs": "^1.10.6",
    "fast-csv": "^4.3.6",
    "globby": "^12.0.0",
    "playwright": "^1.13.0"
  }
}

I’m on macOS 11.5.2 using zsh 5.8 using Node v12.22.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
niftylettucecommented, Feb 17, 2022

v9.1.2 released of cabin! 🎉 please try it out and it should solve your issue, npm install cabin@latest or yarn add cabin@latest

https://github.com/cabinjs/cabin/releases/tag/v9.1.2

1reaction
svenjacobscommented, Feb 16, 2022

It’s not an uncaught exception, just a log message thrown, correct?

Yes, it’s just a log messages, no uncaught exception.

I can see the culprit being here: https://github.com/cabinjs/parse-app-info/blob/master/src/index.js#L78

Would it be possible to disable the “last commit log” functionality of Cabin respectively parse-app-info?

Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal: Not a git repository (or any of the parent directories): .git
The command has to be entered in the directory of the repository. The error is complaining that your current directory isn't a git...
Read more >
Git error - Fatal: Not a git repository and how to fix it | Datree.io
This error means you attempted to run a Git command, but weren't inside a Git repository. Make sure you've: Navigated to the right...
Read more >
How to Fix the “fatal: not a git repository” Error - ContainIQ
Make sure you correctly typed the name of the directory. · Check that you correctly created the repo. If the directory doesn't contain...
Read more >
fatal: not a git repository (or any of the parent directories): .git
The cause of this error message is running a Git command outside of a directory in which a Git folder is initialized. For...
Read more >
fatal: not a git repository (or any of the parent directories): .git
What the error is telling you is that you issued a Git command, (usually within a command line shell), inside a directory that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found