PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

Could not find source map

Open miguelramos opened this issue 10 years ago • 5 comments

Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass

  • I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository
  • Do you want to request a feature or report a bug? Bug
  • What is the current behavior? Remap istanbul on branch aot cannot find sourcemap.
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
  • What is the expected behavior? Shouldn't show message of cannot find source map.
  • What is the motivation / use case for changing the behavior?
  • Please tell us about your environment:
  • Angular version: 2.0.0-beta.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc) node_ENV=test npm run test

[email protected] test /Users/miguelramos/Public/platform karma start

START:

webpack: bundle is now VALID. webpack: bundle is now INVALID.

webpack: bundle is now VALID. 19 10 2016 23:27:34.696:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/ 19 10 2016 23:27:34.700:INFO [launcher]: Launching browser Chrome with unlimited concurrency 19 10 2016 23:27:34.826:INFO [launcher]: Starting browser Chrome 19 10 2016 23:27:38.593:INFO [Chrome 53.0.2785 (Mac OS X 10.11.6)]: Connected on socket /#hXpvzwGbOUGvK2_tAAAA with id 13889031

Configurator ✔ # Should have initial opaque token.

Finished in 0.042 secs / 0.007 secs

SUMMARY: ✔ 1 test completed Error: Could not find source map for: "/Users/miguelramos/Public/platform/src/app/core/configurator.ts" at /Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:257:11 at Array.forEach (native) at /Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:214:22 at Array.forEach (native) at remap (/Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:213:12) at RemapCoverageReporter.onCoverageComplete (/Users/miguelramos/Public/platform/node_modules/karma-remap-coverage/remap-coverage.js:23:23) at Server. (/Users/miguelramos/Public/platform/node_modules/karma/lib/events.js:13:22) at emitTwo (events.js:106:13) at Server.emit (events.js:191:7) at InMemoryReport.writeReport (/Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/in-memory-report.js:14:22) at writeReport (/Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:68:16) at /Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:290:11 at Array.forEach (native) at Collection.forEach (/Users/miguelramos/Public/platform/node_modules/karma/lib/browser_collection.js:93:21) at /Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:247:16 at Array.forEach (native) Error: Could not find source map for: "/Users/miguelramos/Public/platform/src/app/environment.ts" at /Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:257:11 at Array.forEach (native) at /Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:214:22 at Array.forEach (native) at remap (/Users/miguelramos/Public/platform/node_modules/remap-istanbul/lib/remap.js:213:12) at RemapCoverageReporter.onCoverageComplete (/Users/miguelramos/Public/platform/node_modules/karma-remap-coverage/remap-coverage.js:23:23) at Server. (/Users/miguelramos/Public/platform/node_modules/karma/lib/events.js:13:22) at emitTwo (events.js:106:13) at Server.emit (events.js:191:7) at InMemoryReport.writeReport (/Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/in-memory-report.js:14:22) at writeReport (/Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:68:16) at /Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:290:11 at Array.forEach (native) at Collection.forEach (/Users/miguelramos/Public/platform/node_modules/karma/lib/browser_collection.js:93:21) at /Users/miguelramos/Public/platform/node_modules/karma-coverage/lib/reporter.js:247:16 at Array.forEach (native)

=============================== Coverage summary =============================== Statements : 59.68% ( 37/62 ) Branches : 25% ( 5/20 ) Functions : 53.85% ( 7/13 )

Lines : 62.07% ( 36/58 )

miguelramos avatar Oct 19 '16 22:10 miguelramos

I just had a similar issue in my own personal starter (which is heavily inspired by this one). For me it was fixed to changing the istanbul-instrumenter-loader back to 0.2.0.

eXaminator avatar Oct 22 '16 10:10 eXaminator

Changing istanbul-instrumenter-loader back to 0.2.0. didn't work for me :(

nekkon avatar Nov 03 '16 12:11 nekkon

This should definitely be fixed as in the current state, coverage-reports are not working properly. Reverting instanbul-instrumenter-loader to 0.2.0 worked for me, too. Seems like it's related to https://github.com/deepsweet/istanbul-instrumenter-loader/pull/29

ClemensSchneider avatar Nov 04 '16 09:11 ClemensSchneider

@miguelramos @eXaminator @nekkon @ClemensSchneider - For the sake of keeping discussion in the same place, I am going to close this in favor of continuing the discussion in #1188

I'm working on solving this problem, any further insights please comment in the issue above.

@eXaminator - Unfortunately just locking istanbul-instrument-loader to v0.2.0 only works in certain instance & not in #master for this repo.

joshwiens avatar Nov 25 '16 00:11 joshwiens

Setting strict "0.5.0" version for "karma-remap-istanbul" package helps me.

donvadicastro avatar May 05 '17 14:05 donvadicastro