kucherenko / jscpd

Copy/paste detector for programming source code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running HTML reporter

daum1820 opened this issue · comments

Describe the bug
Error when running HTML reporter when updating from 3.5.4 to version 3.5.8
I have two projects using them and both ended up in with the same error.

this is how my node_modules folder looks like after the update
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

 > jscpd .

HTML report saved to target/copy-paste-report/html/
Badge saved to target/copy-paste-report/jscpd-badge.svg

Screenshots

> jscpd .

Error: ENOENT: no such file or directory, stat '<path>/node_modules/@jscpd/html-reporter/public'
    at Object.statSync (node:fs:1591:3)
    at Object.statSync (<path>/node_modules/graceful-fs/polyfills.js:318:34)
    at statSync (<path>/node_modules/fs-extra/lib/util/stat.js:10:52)
    at getStatsSync (<path>/node_modules/fs-extra/lib/util/stat.js:24:19)
    at Object.checkPathsSync (<path>/node_modules/fs-extra/lib/util/stat.js:49:33)
    at Object.copySync (<path>/node_modules/fs-extra/lib/copy-sync/copy-sync.js:24:38)
    at HtmlReporter.report (<path>/node_modules/@jscpd/html-reporter/dist/index.js:19:28)
    at <path>/node_modules/@jscpd/finder/dist/in-files-detector.js:82:26
    at Array.forEach (<anonymous>)
    at <path>/node_modules/@jscpd/finder/dist/in-files-detector.js:81:28 {
  errno: -2,
  syscall: 'stat',
  code: 'ENOENT',
  path: '<path>/node_modules/@jscpd/html-reporter/public'
}
Badge saved to target/copy-paste-report/jscpd-badge.svg

Desktop (please complete the following information):

  • NodeJS Version 18
  • jscpd version 3.5.8

thank you, will fix

fixed at jscpd@3.5.9