quasar build 报错
node 版本:12.16.2
npm 版本:6.14.4
pkg quasar 版本:1.6.1
pkg @quasar/app 版本:1.4.4
本地启动项目正常(quasar dev),但是 build 的时候报错如下:
(node:29752) UnhandledPromiseRejectionWarning: Error: Expected a pseudo-class or pseudo-element.
- parser.js:137 Root._error
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:137:24 - root.js:43 Root.error
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/selectors/root.js:43:25 - parser.js:392 Parser.error
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:392:25 - parser.js:685 Parser.expected
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:685:25 - parser.js:500 Parser.pseudo
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:500:25 - parser.js:649 Parser.parse
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:649:22 - parser.js:618 Parser.loop
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:618:18 - parser.js:129 new Parser
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/parser.js:129:14 - processor.js:47 Processor._root
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/processor.js:47:22 - processor.js:83 Processor._runSync
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/processor.js:83:25 - processor.js:177 Processor.processSync
[tennis-front]/[postcss-minify-selectors]/[postcss-selector-parser]/dist/processor.js:177:27 - index.js:34 getParsed
[tennis-front]/[postcss-minify-selectors]/dist/index.js:34:59 - index.js:196
[tennis-front]/[postcss-minify-selectors]/dist/index.js:196:39 - container.js:239
[tennis-front]/[postcss]/lib/container.js:239:18 - container.js:135
[tennis-front]/[postcss]/lib/container.js:135:18 - container.js:101 Root.each
[tennis-front]/[postcss]/lib/container.js:101:16
(node:29752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejectin
g a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.or
SPA ███████████████████████ chunk asset optimization [92%] OptimizeCssAssetsWebpackPlugin
看提示是因为异步方法没有 catch 的问题,但是把所有异步方法全部注释掉重新 install 和 build,依然会报这个错。
这种问题除非碰到过,否则很难给你答案。建议使用排除法,排除一些模块或页面,看是否正常,排查出问题所在。