Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Getting "clean_css_1.default is not a constructor" errors on latest release #102

Closed
FreekVR opened this issue May 22, 2020 · 1 comment
Closed

Comments

@FreekVR
Copy link

FreekVR commented May 22, 2020

Since the lastest release (4.2.2) I'm getting errors due to an apparent issue with the clean_css usage:

[!] (plugin VuePlugin) TypeError: clean_css_1.default is not a constructor
src/components/layout.vue
TypeError: clean_css_1.default is not a constructor
    at initializer (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/postcss-clean.js:6:19)
    at Object.creator (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/node_modules/postcss/lib/postcss.es6:111:27)
    at SFCCompiler.doCompileStyle (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/compiler.js:133:42)
    at SFCCompiler.<anonymous> (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/compiler.js:116:47)
    at Generator.next (<anonymous>)
    at /home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/compiler.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/compiler.js:3:12)
    at SFCCompiler.compileStyleAsync (/home/freek/projects/styleguide/node_modules/@vue/component-compiler/dist/compiler.js:115:16)
    at Object.<anonymous> (/home/freek/projects/styleguide/node_modules/rollup-plugin-vue/dist/rollup-plugin-vue.js:271:57)
    at Generator.next (<anonymous>)
    at /home/freek/projects/styleguide/node_modules/rollup-plugin-vue/dist/rollup-plugin-vue.js:33:71
    at new Promise (<anonymous>)
    at __awaiter (/home/freek/projects/styleguide/node_modules/rollup-plugin-vue/dist/rollup-plugin-vue.js:29:12)
    at Promise.all.descriptor.styles.map (/home/freek/projects/styleguide/node_modules/rollup-plugin-vue/dist/rollup-plugin-vue.js:267:87)
    at Array.map (<anonymous>)

If I use the yarn "resolutions"-field to downgrade to 4.2.1, the issue disappears. Alternatively, removing the "default"-suffix from "clean_css_1" in node_modules/@vue/component-compiler/dist/postcss-clean.js also fixes the issue on 4.2.2

@znck
Copy link
Member

znck commented May 22, 2020

Fixed in #103

@znck znck closed this as completed May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants