-
Notifications
You must be signed in to change notification settings - Fork 786
react-apollo beta won't minify with create-react-app build process #1734
Comments
solved by reverting version to "2.0.4", deleting node_modules, yarn/npm install -> run build |
ok i figured it had to do with beta, but i just started building a new app based off latest docs using apollo-boost and the newer components like |
had to just comment out the uglify plugin (line 291) in |
This needs to be fixed soon. I can even build. This failed. |
@tavelli you could revert to 2.1.0-beta.2. CRA has not build problem with this version |
Ok thanks that's good tip. I don't need to build and deploy quite yet just
wanted to raise it so hopefully will be fixed before 2.1 final release
…On Mar 4, 2018 5:01 PM, "Bohdan Lyzanets" ***@***.***> wrote:
@tavelli <https://github.com/tavelli> you could revert 2.1.0-beta.2. CRA
has not build problem with this version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1734 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAdmVzZ6pxuQUv0KyXpMi1CUbyEtkOWuks5tbGQngaJpZM4SWEMD>
.
|
Quick & dirty fix: // package.json
"scripts": {
"fix-react-apollo": "rimraf ./node_modules/react-apollo/*.mjs",
"build": "npm run fix-react-apollo && react-scripts build"
}, Just removing all the |
This is being fixed in CRA in facebook/create-react-app#4085 |
@jbaxleyiii seems to have fixed this in #1769. I expect there to be a new release containing the fix soon. |
@excitement-engineer just tested with 2.1.0-rc.3, working great! |
If your project is built with Create React App and not ejected, https://github.com/facebook/create-react-app/releases/tag/v1.1.2 Otherwise you can apply a similar fix yourself in your project config. Cheers! |
@gaearon did not fixed, i had to downgrade to react-apollo@2.1.1 |
For others, I tried the other solutions. But, only @fabien0102's solution worked for me. version: |
I did "yarn install" and the error disappeared for me. |
Intended outcome:
npm run build compiles code
Actual outcome:
get the following build error
How to reproduce the issue:
have a basic create-react-app, add react-apollo beta and try to run "build" script.
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
Version
"react-apollo": "2.1.0-beta.3"
The text was updated successfully, but these errors were encountered: