[Solved] postcss-svgo: TypeError when building for release
-
Hey everyone,
I’m having a hard time building my project today.
My problem is, when I debug my project (quasar dev), everything works, but when I try to build it (quasar build), the following error shows up:(node:44796) UnhandledPromiseRejectionWarning: Error: postcss-svgo: TypeError: Cannot read property ‘path’ of undefined
- index.js:93 promises.push.svgo.optimize.then.catch.error
[my-project]/[postcss-svgo]/dist/index.js:93:19
I just updated my quasar version using the following command:
npm install --save-dev quasar-cli@latestThe build was working before that, could this be a version problem?
Can this be a svgo problem?
Has anyone been through this? Any ideas? - index.js:93 promises.push.svgo.optimize.then.catch.error
-
Hey, just figured it out…
So it happens that when I upgraded my packages, the type of path used on quasar wasn’t compatible with the latest version of postcss-svgo:
See https://github.com/svg/svgo/issues/1030
There you will find out that this was solved on the v1.1.1 released today, so upgrading usingnpm install --save-dev quasar-cli@latest
again fixed it