Closed jmatsushita closed 8 years ago
Ok I've isolated this strange problem but I'm not sure yet what's causing it:
source
├── css
│ └── two.css
└── one.md
pipelines['build-css'] = [
glob({ basePath: 'source' }, '**/*.*'),
debug(),
write('dest')
]
$ sigh build-css
add: source/css/two.css
add: source/one.md
! error: pipeline build-css
! TypeError: Cannot read property 'map' of undefined
If I rename two.css -> two.md then it works.
Seems like this line https://github.com/sighjs/sigh/blob/master/src/plugin/write.js#L63 is throwing the error. So it's related to the code expecting a sourcemap for the css file.
I have a fix almost ready for this, coincidentally someone raised it today but via a different manifestation.
This should be fixed in the latest version, let me know if it isn't and I can apply this PR. Thanks!
jmatsushita's fix in his PR works for me.
@joelanders and the latest version of sigh with the latest sigh-core peer dependency does not?
@joelanders I think @jmatsushita's patch is wrong and will break source maps in other instances.
I confirm that my patch is wrong and also that the latest version (sigh@0.12.28 ) doesn't solve the problem with the test above
Ah this is a duplicate of https://github.com/sighjs/sigh-core/issues/3
I'm getting this error message without further information...
It happens with a large file tree and I think in the write plugin.