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.

Use in empty git repository

See original GitHub issue

When used in an empty git repository I get:

Module build failed: Error: ENOENT: no such file or directory, open '/home/daurnimator/myproject/.git/packed-refs'
    at Object.fs.openSync (fs.js:663:18)
    at Object.fs.readFileSync (fs.js:568:33)
    at Object.long (/home/daurnimator/myproject/node_modules/git-rev-sync/index.js:109:31)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
daurnimatorcommented, Feb 16, 2018

null I think? Probably same as if you’re not in a git repository.

1reaction
sunknudsencommented, Mar 15, 2020

@kurttheviking I also believe this package should have a feature (or default) to return null instead of throwing the following errors (or any other error related to git not being fully initialized).

Error: [git-rev-sync] no git repository found
Error: ENOENT: no such file or directory
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to completely empty a remote Git repository?
Best way to empty the GitHub repository. Step 1: Create new branch. git checkout -b master1. Step 2: Add your data into its....
Read more >
Import source tree into an empty git repo - os161ubc
Import source tree into an empty git repo · Create the remote repository, and get the URL. · Locally, at the root directory...
Read more >
Create and push to an empty git repository - Linux Things
Create and push to an empty git repository ... Run these commands from the root of your source tree. Make sure that you...
Read more >
Add An Existing Project to an Empty Github Repository
Step 1: Create a Repository on Github · Click the drop-down menu from the upper right area of the screen near your profile...
Read more >
Use .gitkeep to commit & push an empty Git folder or directory
The purpose of the .gitkeep file is to solve problem of Git not pushing empty folders to remote DVCS repos like GitHub or...
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