Skip to content

Cannot read property 'substr' of undefined #247

@kaiza

Description

@kaiza

TypeError: Cannot read property 'substr' of undefined
at Function. (...\node_modules\webpack-sources\node_modules\source-map\lib\source-node.js:115:26)

Version: 0.5.6

This problem seems to be related to trying to parse a js file containing a long //# sourceMappingURL at the end. For example, by trying to use the typemoq library in an Angular 2 application, as per this SO issue:

http://stackoverflow.com/questions/40002699/typemoq-and-angular-cli-dont-work-together#comment67466029_40002699

If I delete the //# sourceMappingURL line from typemoq.js the source node loads fine.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions