ludohenin / gulp-inline-ng2-template

Gulp plugin to inline HTML and CSS into Angular 2 component decorators
MIT License
126 stars 26 forks source link

Error: Source map to be applied is missing the "file" property #92

Closed almothafar closed 6 years ago

almothafar commented 6 years ago

Currently, with the new version 5.0.0 the build fails with error:

events.js:167
      throw er; // Unhandled 'error' event
      ^
Error: Source map to be applied is missing the "file" property
    at assertProperty (D:\...\node_modules\vinyl-sourcemaps-apply\index.js:36:13)
    at applySourceMap (D:\...\node_modules\vinyl-sourcemaps-apply\index.js:15:3)
    at D:\...\node_modules\gulp-inline-ng2-template\index.js:26:9
    at D:\...\node_modules\gulp-inline-ng2-template\parser.js:113:7
    at D:\...\node_modules\async\dist\async.js:3888:9
    at D:\...\node_modules\async\dist\async.js:473:16
    at replenish (D:\...\node_modules\async\dist\async.js:1006:25)
    at D:\...\node_modules\async\dist\async.js:1016:9
    at eachOfLimit (D:\...\node_modules\async\dist\async.js:1041:24)
    at D:\...\node_modules\async\dist\async.js:1046:16
Emitted 'error' event at:
    at DestroyableTransform.onerror (D:\...\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:558:12)
    at DestroyableTransform.emit (events.js:182:13)
    at DestroyableTransform._transform (D:\...\node_modules\gulp-inline-ng2-template\index.js:33:12)
    at DestroyableTransform.Transform._read (D:\...\node_modules\readable-stream\lib\_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (D:\...\node_modules\readable-stream\lib\_stream_transform.js:172:83)
    at doWrite (D:\...\node_modules\readable-stream\lib\_stream_writable.js:428:64)
    at writeOrBuffer (D:\...\node_modules\readable-stream\lib\_stream_writable.js:417:5)
    at DestroyableTransform.Writable.write (D:\...\node_modules\readable-stream\lib\_stream_writable.js:334:11)
    at write (D:\...\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:623:24)
    at flow (D:\...\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:632:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xxxx build: `rimraf dist && rimraf tmp && yarn install && node tools/build.js && rimraf tmp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xxxx build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\almothafar\AppData\Roaming\npm-cache\_logs\2018-06-20T09_12_47_692Z-debug.log

D:\...>

it seems the breaking changes unsolvable.

valentin-kennke commented 6 years ago

@dhilgarth Any ideas? Looks like this was introduced by #90.

dhilgarth commented 6 years ago

Will check on Monday

mlc-mlapis commented 6 years ago

... we have the same problem.

actra-gschuster commented 6 years ago

Problem is in parser.js line 112: var codeWithSourceMap = node.toStringWithSourceMap({ file: file.basename }); file.basename is undefined.

actra-gschuster commented 6 years ago

@dhilgarth Fix is in #96

dhilgarth commented 6 years ago

@actra-gschuster : Thanks for jumping in. Have been drowning in work lately...