Open jeremyfrank opened 7 years ago
Are you able to post the code that you used that generated this error?
A streamlined version, with plugins previously required, is:
const plugins = [
easyImport({plugins: [stylelint]}),
mixins(),
strip(),
units(), // provides em() and rem() functions
nesting(), // use a more update version of postcss-nesting
cssnext(),
normalize({forceImport: true}),
reporter({clearReportedMessages: true})
]
return gulp.src(paths.src)
.pipe(postcss(plugins))
.pipe(gulp.dest(paths.dest))
.pipe(browserSync.stream())
I think the issue may be that cssnext internally includes the custom properties and the calc plugins, but the usage instructions for strip-units show it being required in between those two plugins.
I have same problem.
It is not clear what the cause of the error is that you are reporting, but I can make some guesses and they would be resolved as part of a pull request I submitted recently: https://github.com/whitneyit/postcss-strip-units/pull/5
@jeremyfrank, @cuiyajie, are you able to confirm that this works with version 2.0.1
?
Seems to be working fine with 2.0.1!
Got the error below when trying out this plugin for the first time, in a PostCSS plugin stack that looks like this:
postcss-easy-import postcss-nesting postcss-strip-units postcss-cssnext postcss-normalize postcss-reporter