Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create-React-App Fails to Minify #14

Closed
ilrein opened this issue Nov 29, 2017 · 7 comments
Closed

Create-React-App Fails to Minify #14

ilrein opened this issue Nov 29, 2017 · 7 comments

Comments

@ilrein
Copy link

ilrein commented Nov 29, 2017

The aforementioned toolset for spinning up React apps fails to compile for production this package.

The exact message:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./~/react-chartkick/index.js:14 

Looking at the code, it seems to throw an err at the first arrow function:

var createComponent = (chartType) => {

It's referenced in the README to this issue: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

Basically the package is published and the "main" of package.json references the non-babel transpiled code. This package won't work unless an ES5 version is the main export.

@ilrein ilrein changed the title Create-React-App Create-React-App Fails to Minify Nov 29, 2017
@ankane ankane closed this as completed in aec85a1 Dec 1, 2017
@ankane
Copy link
Owner

ankane commented Dec 1, 2017

Hey @ilrein, thanks for the detailed report 💯 Fixed on master. Will push out a new release later tonight.

@BernardoFBBraga
Copy link

hey @ankane I'm getting this error on 0.1.7 however the error points to ./node_modules/chartkick/src/helpers.js:15
I'm not sure if I should go to chartkick to request this as they are not really concerend about react and create-react-app

@BernardoFBBraga
Copy link

just realized both projects are yours

@ankane
Copy link
Owner

ankane commented Mar 27, 2018

Make sure you’re on the latest chartkick (2.3.4)

@ankane
Copy link
Owner

ankane commented Mar 27, 2018

Fixed in ankane/chartkick.js#97

@BernardoFBBraga
Copy link

Github says last version is 2.3.3, which confused me. I updated the package.json and it worked thanks

@ankane
Copy link
Owner

ankane commented Mar 27, 2018

Where does it show that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants