postcss-loader: [2.0.1] "Cannot create property 'prev' on boolean 'false'" (options.sourceMap)
Module build failed: TypeError: Cannot create property 'prev' on boolean 'false'
at Promise.resolve.then.then (../node_modules/postcss-loader/lib/index.js:125:47)
{
loader: 'postcss-loader',
options: {
sourceMap: true,
...
},
},
These lines are the culprit: https://github.com/postcss/postcss-loader/blob/master/lib/index.js#L93 https://github.com/postcss/postcss-loader/blob/master/lib/index.js#L125
postcss@1.3.3 works fine
webpack@2.5.1 OSX 10.12.4 Node.js 7.10.0 postcss-loader@2.0.0
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 30 (12 by maintainers)
I’m using 2.0.1 and still get the error
It works when I remove sourceMap from sass-loader
Fixed in https://github.com/postcss/postcss-loader/commit/c4f006472a85d3bc36ae3f2f0e750291fd732b7b Released in v2.0.1
Issue also persists for me with version 2.0.1. Is it worth reopening this issue?
But
map
insidepostcss.config.js
isn’t supported atm 😃, this is debateable, but I left it on purpose, because it doesn’t fit into the way one enables sourcemaps ‘normally’ with webpack (consistency). Please use{ sourceMap: true }
inwebpack.config.js
FYI I think this error occurs if the loader is set to pass sourceMaps:
And the postcss.config.js also includes the map property:
@michael-ciniawsky Thanks, it works.