Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error if current directory does not have a .gitignore file #5

Open
alxndr opened this issue Aug 1, 2023 · 0 comments
Open

error if current directory does not have a .gitignore file #5

alxndr opened this issue Aug 1, 2023 · 0 comments

Comments

@alxndr
Copy link

alxndr commented Aug 1, 2023

Fresh installation of v2.1.0, on MacOS Ventura 13.4.1...

I've installing precise-watcher into a brand new JS project, where I have not yet created/needed a .gitignore file. I'm finding that a basic use of precise-watcher will throw an error attempting to open .gitignore.

If I touch .gitignore and then re-run the watch task, it does not error and successfully listens for changes.

⟫ npm run -s watch
Starting precise-watcher
[Error: ENOENT: no such file or directory, open '/Users/[...]/repo/.gitignore'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/[...]/repo/.gitignore'
}
Usage: [...]

TypeError: Cannot read properties of undefined (reading 'map')
    at module.exports (/Users/[...]/repo/node_modules/precise-watcher/src/start.js:6
1:56)
    at async Object.handler (/Users/[...]/repo/node_modules/precise-watcher/bin/cli:
28:5)

Stopping precise-watcher

1 ✘ 

⟫ touch .gitignore



⟫ npm run -s watch        
Starting precise-watcher
^C
Stopping precise-watcher



⟫ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant