mars / create-react-app-buildpack

⚛️ Heroku Buildpack for create-react-app: static hosting for React.js web apps
MIT License
3.29k stars 653 forks source link

Can't push. Build failed. "Module build failed: BrowserslistError: Unknown browser query `op_mini all`" #30

Closed lavrton closed 7 years ago

lavrton commented 7 years ago

Hi. Heroku can't build create-react-app project. Localy npm run build works ok.

Error output:

remote: > react-scripts build
remote:
remote: Creating an optimized production build...
remote: Failed to compile.
remote:
remote: Module build failed: BrowserslistError: Unknown browser query `op_mini all`
remote:     at error (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/browserslist/index.js:23:15)
remote:     at /tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/browserslist/index.js:90:13
remote:     at Array.forEach (native)
remote:     at browserslist (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/browserslist/index.js:62:16)
remote:     at isSupported (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/caniuse-api/dist/index.js:75:10)
remote:     at /tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:87:66
remote:     at /tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:170:26
remote:     at Selector.each (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:153:22)
remote:     at Selector.walk (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:169:21)
remote:     at /tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:173:31
remote:     at Root.each (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:153:22)
remote:     at Root.walk (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/selectors/container.js:169:21)
remote:     at Processor.func (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:80:17)
remote:     at Processor.process (/tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-selector-parser/dist/processor.js:34:14)
remote:     at /tmp/build_aa1153ea93115ef463a11431c946d409/node_modules/postcss-merge-rules/dist/lib/ensureCompatibility.js:121:12
remote:     at Array.every (native)

Looks like it is not using last version of browserslist. Do you have a ideas how to solve the issue?

lavrton commented 7 years ago

Ah. I found the root of the problem. I had harp (https://harpjs.com/) in package.json dependencies. Probably it uses a different version of browserslist. So it causes the fail. Removing it from package.json solves the issue.