Skip to content
New issue

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

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

Already on GitHub? # to your account

Publish pre-compiled code to npm #147

Closed
rooneyg21 opened this issue Mar 21, 2018 · 3 comments
Closed

Publish pre-compiled code to npm #147

rooneyg21 opened this issue Mar 21, 2018 · 3 comments

Comments

@rooneyg21
Copy link

I was trying to use this with create-react-app. However, I can't run a production build because this library has some ES6 code published to npm.

Please refer to this link for the error
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

@dantman
Copy link

dantman commented Mar 21, 2018

I just tried installing both fb and fb@next, both versions only include compiled ES5 code. I haven't even included the source version or a modules version as of yet. Could you show me the actual error you are getting.

@Aubron
Copy link

Aubron commented Apr 5, 2018

I'm also receiving this issue:

yarn run v1.3.2
$ react-scripts build
Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file: 

 	./node_modules/fb/lib/fb.js:130 

Read more here: http://bit.ly/2tRViJ9

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Exited with code 1

@Aubron
Copy link

Aubron commented Apr 5, 2018

runinng the file (fb.js) through JSHint shows a lot of ES6 issues, including the following:

634 | 'template literal syntax' is only available in ES6 (use 'esversion: 6').
681 | 'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
686 | 'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants