question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during project build "postcss-svgo: TypeError: Cannot set property 'multipassCount' of undefined"

See original GitHub issue

Describe the bug

Getting failed to compile error during build process on

`$ react-scripts build Creating an optimized production build… Failed to compile.

postcss-svgo: TypeError: Cannot set property ‘multipassCount’ of undefined

error Command failed with exit code 1.`

Environment

Environment Info:

System: OS: macOS 10.14.6 CPU: (12) x64 Intel® Core™ i7-8750H CPU @ 2.20GHz Binaries: Node: 12.13.0 - /usr/local/bin/node Yarn: 1.19.1 - ~/.yarn/bin/yarn npm: 6.12.0 - /usr/local/bin/npm Browsers: Chrome: 78.0.3904.70 Firefox: Not Found Safari: 13.0.3 npmPackages: react: ^16.8.6 => 16.11.0 react-dom: ^16.8.6 => 16.11.0 react-scripts: 3.1.2 => 3.1.2 npmGlobalPackages: create-react-app: Not Found

Steps to reproduce

(Write your steps here:)

  1. yarn install 2.yarn build

Expected behavior

React build process will spit out a Build folder with project files.

Actual behavior

Package.json { "name": "managerviewfrontend", "version": "0.1.0", "private": true, "dependencies": { "@date-io/date-fns": "^1.3.5", "@material-ui/core": "^4.5.0", "@material-ui/icons": "^3.0.2", "@material-ui/pickers": "^3.2.6", "@sentry/browser": "^5.4.0", "@types/classnames": "^2.2.7", "@types/jest": "24.0.12", "@types/lodash": "^4.14.137", "@types/material-ui": "^0.21.6", "@types/node": "12.0.0", "@types/react": "16.8.16", "@types/react-dom": "16.8.4", "@types/react-filepond": "^5.0.3", "@types/react-router-dom": "^4.3.3", "D": "^1.0.0", "autosuggest-highlight": "^3.1.1", "axios": "^0.19.0", "axios-observable": "^1.1.2", "caman": "^4.1.2", "classnames": "^2.2.6", "connected-react-router": "^6.5.2", "core-js": "^3.2.1", "cypress": "3.5.0", "date-fns": "^2.1.0", "doka": "^0.1.0", "filepond": "^4.5.0", "filepond-plugin-image-edit": "^1.4.0", "filepond-plugin-image-exif-orientation": "^1.0.6", "filepond-plugin-image-preview": "^4.4.0", "formik": "^1.5.4", "history": "^4.9.0", "i18next": "^17.0.15", "i18next-browser-languagedetector": "^3.0.1", "lodash": "^4.17.11", "logrocket": "^1.0.3", "logrocket-react": "^3.0.1", "material-ui-flat-pagination": "^4.0.0", "material-ui-pickers": "^2.2.4", "moment": "^2.24.0", "node-sass": "^4.12.0", "query-string": "^6.5.0", "react": "^16.8.6", "react-adal": "^0.5.0", "react-app-polyfill": "^1.0.2", "react-autosuggest": "^9.4.3", "react-devtools": "^3.6.3", "react-dom": "^16.8.6", "react-filepond": "^7.0.1", "react-i18next": "^10.9.0", "react-places-autocomplete": "^7.2.1", "react-redux": "^7.1.0", "react-router": "^5.0.1", "react-router-dom": "^5.0.0", "react-scripts": "3.1.2", "react-snapshot": "^1.3.0", "react-svg": "^9.0.4", "react-swipeable-views": "^0.13.3", "react-use-localstorage": "^3.3.2", "recompose": "^0.30.0", "redux": "^4.0.4", "redux-persist": "^6.0.0", "redux-react-hook": "^3.3.2", "redux-thunk": "^2.3.0", "request-promise": "^4.2.4", "rxjs": "^6.5.3", "source-map-explorer": "^2.0.1", "typescript": "3.4.5", "underscore": "^1.9.1", "use-react-router": "^1.0.7", "whatwg-fetch": "^3.0.0", "yup": "^0.27.0" }, "scripts": { "analyze": "source-map-explorer 'build/static/js/*.js'", "start": "PORT=3001 react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "cypress": "cypress open" }, "eslintConfig": { "extends": "react-app" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all", "cover 99.5%" ], "development": [ "last 2 chrome version", "last 2 firefox version", "last 2 safari version" ] }, "devDependencies": { "enzyme": "^3.10.0", "enzyme-adapter-react-16": "^1.14.0", "enzyme-to-json": "^3.3.5", "fakerator": "^0.3.0" }, "resolutions": { "minipass": "2.7.0" } }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:23
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
KathrynNcommented, Oct 30, 2019

The solution that worked for me: manually install the svgo dependency, either with npm npm install svgo@1.3.0 -E or by popping the below into your package.json file as a dependency: "svgo": "1.3.0", Then reinstall all the node_modules: rm -rf node_modules npm i This seems to force bootstrap (and it is react-bootstrap, not create-react-app) to use the working version.

note: I based this on an answer over here https://stackoverflow.com/questions/58616161/postcss-svgo-typeerror-cannot-set-property-multipasscount-of-undefined-gats

8reactions
montydhanjalcommented, Oct 29, 2019

Related: svg/svgo#1174

Thank you @jsphstls , This issue is being talked about here. Temporary fix: https://github.com/svg/svgo/issues/1174#issuecomment-547643398

Read more comments on GitHub >

github_iconTop Results From Across the Web

postcss-svgo: TypeError: Cannot set property 'multipassCount ...
I'm getting the same error, coming in through react-scripts@3.2.0 or 3.0.1 as the dependency from my project, also on Node 8. – interfect....
Read more >
[Solved] postcss-svgo: TypeError when building for release
Hey everyone, I'm having a hard time building my project today. ... Error: postcss-svgo: TypeError: Cannot read property 'path' of undefined.
Read more >
postcss-svgo - npm
Start using postcss-svgo in your project by running `npm i postcss-svgo`. There are 132 other projects in the npm registry using postcss-svgo.
Read more >
reactjs - Cannot find MDX module in Gatsby - Stack Overflow
I'm making a Gatsby site, and I've intially set it up to use markdown files via ... the project from MD to MDX,...
Read more >
CSS minification error: postcss-svgo: TypeError: Cannot set ...
最近做的H5宣传页,使用了vue-awesome-swiper插件后,运行npm run serve没错,但是打包使用npm run build时,不知道为什么报了这个错误:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found