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: Unable to find entry for [...] #45

Open
alexgorbatchev opened this issue Apr 2, 2016 · 8 comments
Open

Error: Unable to find entry for [...] #45

alexgorbatchev opened this issue Apr 2, 2016 · 8 comments

Comments

@alexgorbatchev
Copy link

I'm trying to use the gulp plugin and it doesn't seem to work.

gulp.task('test:remap-istanbul', function() {
  var remapIstanbul = require('remap-istanbul/lib/gulpRemapIstanbul');
  return gulp.src('coverage/coverage.json')
    .pipe(remapIstanbul({
      reports: {
        'html': 'coverage/html-report',
      }
    }));
});

Throws this error:

gulp test:remap-istanbul
[11:32:05] Requiring external module ts-node/register
[11:32:07] Using gulpfile ~/1/hot-reload-example/gulpfile.ts
[11:32:07] Starting 'test:remap-istanbul'...

/.../node_modules/remap-istanbul/node_modules/istanbul/lib/store/memory.js:38
            throw new Error('Unable to find entry for [' + key + ']');
                  ^
Error: Unable to find entry for [src/components/BannerComponent-spec.tsx]
    at MemoryStore.Store.mix.get (/.../node_modules/remap-istanbul/node_modules/istanbul/lib/store/memory.js:38:19)
    at HtmlReport.Report.mix.writeDetailPage (/.../node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:411:67)
    at /.../node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:489:26
    at SyncFileWriter.extend.writeFile (/.../node_modules/remap-istanbul/node_modules/istanbul/lib/util/file-writer.js:57:9)
    at FileWriter.extend.writeFile (/.../node_modules/remap-istanbul/node_modules/istanbul/lib/util/file-writer.js:147:23)
    at /.../node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:488:24
    at Array.forEach (native)
    at HtmlReport.Report.mix.writeFiles (/.../node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:482:23)
    at /.../node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:484:22
    at Array.forEach (native)

However, from command line with everything else being the same, it works wonderfully:

$ ./node_modules/.bin/remap-istanbul -i coverage/coverage.json -o coverage/html-report -t html

What am I doing wrong?

@kitsonk
Copy link
Contributor

kitsonk commented Apr 18, 2016

I think this had a fair amount to do with the issues encountered when using sources contained in a source map. Could you try 0.6.3 and see if the issue persists?

@EarthCitizen
Copy link

I am seeing the same issue in 0.6.4 via karma-remap-istanbul 0.2.1

@knightbk
Copy link

knightbk commented Sep 1, 2016

I am having the same error when running the same thing.

./node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage/html-report -t html
C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\store\memory.js:38
            throw new Error('Unable to find entry for [' + key + ']');
            ^

Error: Unable to find entry for [app\app.component.ts]
    at MemoryStore.Store.mix.get (C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\store\memory.js:38:19)
    at HtmlReport.Report.mix.writeDetailPage (C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\report\html.js:411:67)
    at C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\report\html.js:489:26
    at SyncFileWriter.extend.writeFile (C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\util\file-writer.js:57:9)
    at FileWriter.extend.writeFile (C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\util\file-writer.js:147:23)
    at C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\report\html.js:488:24
    at Array.forEach (native)
    at HtmlReport.Report.mix.writeFiles (C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\report\html.js:482:23)
    at C:\Users\bknight\Source\Repos\pf\pf.Presentation.Angular2\node_modules\istanbul\lib\report\html.js:484:22
    at Array.forEach (native)

@bortexz
Copy link

bortexz commented Sep 12, 2016

Having this error as well

12 09 2016 10:10:00.495:ERROR [karma]: [Error: Unable to find entry for [src/app/app.component.ts]]
Error: Unable to find entry for [src/app/app.component.ts]
    at MemoryStore.Store.mix.get (/Users/alberto/Projects/personal/angular2-electron/node_modules/istanbul/lib/store/memory.js:38:19)
    at HtmlReport.Report.mix.writeDetailPage (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:411:67)
    at /Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:489:26
    at SyncFileWriter.extend.writeFile (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/util/file-writer.js:57:9)
    at FileWriter.extend.writeFile (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/util/file-writer.js:147:23)
    at /Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:488:24
    at Array.forEach (native)
    at HtmlReport.Report.mix.writeFiles (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:482:23)
    at /Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:484:22
    at Array.forEach (native)
    at HtmlReport.Report.mix.writeFiles (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:482:23)
    at HtmlReport.Report.mix.writeReport (/Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/node_modules/istanbul/lib/report/html.js:566:14)
    at /Users/alberto/Projects/personal/angular2-electron/node_modules/remap-istanbul/lib/writeReport.js:77:22
    at /Users/alberto/Projects/personal/angular2-electron/node_modules/amdefine/amdefine.js:125:34
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

@EarthCitizen
Copy link

EarthCitizen commented Sep 12, 2016

@bertofer If you are executing remap-istanbul through karma-remap-istanbul, you can disable the HTML reporting for karma-remap-istanbul and just execute remap-istanbul after Karma runs. This is what several people have done while this issue remains unresolved. I did this myself. I only have the issue when karma-remap-istanbul executes/uses remap-istanbul.

This may turn out to be an issue with karma-remap-istanbul, or with the API that karma-remap-istanbul uses.

@Elecash
Copy link

Elecash commented Sep 17, 2016

I can confirm that this is not happening in v0.5.1 to me.

I hope that this leads you to the problem :)

@dylans dylans added this to the 0.8.0 milestone Nov 1, 2016
@dylans dylans modified the milestones: 0.8.0, 0.9.0 Jan 11, 2017
@dylans dylans modified the milestones: 0.9.0, 0.10.0 Feb 22, 2017
@majanord
Copy link

I'm getting this error:
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unable to find entry for ....
or something similar when using version 0.7.0 -> 0.9.5 while it there's no error from 0.5.1 - 0.6.4 thx for the idea for the temporary fix @Elecash .

@pgarge
Copy link

pgarge commented Jan 10, 2018

Version 0.9.5 was working with Angular 4 and html report was generated.

If I upgrade to Angular 5 and keep all the other packages same I get the same error.

If I comment the html reporting line there is no error.

Versions lower than 0.7.0 don't work with Angular 5 either.

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

No branches or pull requests

9 participants