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

Unhandled Rejection when .jscpd folder is missing on macOS #220

Closed
screendriver opened this issue Apr 4, 2019 · 1 comment
Closed

Unhandled Rejection when .jscpd folder is missing on macOS #220

screendriver opened this issue Apr 4, 2019 · 1 comment

Comments

@screendriver
Copy link

screendriver commented Apr 4, 2019

Describe the bug

I have exactly the same issue as described in #204

(node:9785) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, unlink '.jscpd/statistic'
    at Object.unlinkSync (fs.js:951:3)
    at Function.rimrafSync [as sync] (/Users/me/project/node_modules/rimraf/rimraf.js:306:17)
    at new LevelDbStore (/Users/me/project/node_modules/jscpd/build/stores/leveldb.js:13:30)
    at StoreManager.create (/Users/me/project/node_modules/jscpd/build/stores/stores-manager.js:98:33)
    at StoreManager.getStore (/Users/me/project/node_modules/jscpd/build/stores/stores-manager.js:75:18)
    at StatisticListener.saveStatistic (/Users/me/project/node_modules/jscpd/build/listeners/statistic.js:83:56)
    at StatisticListener.matchSource (/Users/me/project/node_modules/jscpd/build/listeners/statistic.js:80:14)
    at JscpdEventEmitter.emit (/Users/me/project/node_modules/eventemitter3/index.js:181:35)
    at /Users/me/project/node_modules/jscpd/build/jscpd.js:313:48
    at Array.map (<anonymous>)

To Reproduce

  1. Create a completely new project
  2. Run jscpd src (or jscpd .)

Expected behavior

I would expect to not see a unhandled rejection warning and that the program exists with exit code 1.

Desktop (please complete the following information):

  • OS: macOS
  • OS Version: 10.14.4
  • NodeJS Version: 10
  • jscpd version: 2.0.13
@screendriver
Copy link
Author

I close this because I named the configuration file .jscpd instead of .jscpd.json 🙄 Now it works 👍

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