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

It seems tarn breaks create-react-app compilation #7

Closed
YagoLopez opened this issue May 27, 2018 · 4 comments
Closed

It seems tarn breaks create-react-app compilation #7

YagoLopez opened this issue May 27, 2018 · 4 comments

Comments

@YagoLopez
Copy link

Hello. As far as I know a project based on create-react-app needs its dependencies compiled to ES5 but it seems that tarn package only provides ES6 code. Could your provide any help?

Here is the error I get:

Failed to minify the code from this file:

 	./node_modules/tarn/lib/utils.js:6

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

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! metaphasejs-react-demo@0.1.0 build: `react-scripts-ts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the metaphasejs-react-demo@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\yagol\AppData\Roaming\npm-cache\_logs\2018-05-27T18_35_40_031Z-debug.log
@koskimas
Copy link
Collaborator

koskimas commented May 27, 2018

That error doesn't really say anything. I'm sorry, but I don't have time to solve this for you. You need to google that yourself.

Tarn is written in node 4.0.0 compatible ES6 code. We won't support older nodes or rewrite the project in ES5.

@koskimas
Copy link
Collaborator

Oh, and I forgot to mention that only node is officially supported, not browsers.

@YagoLopez
Copy link
Author

What the error says is create-react-app can't compile code in ES6. It does not mean tarn has got errors.

It is explained following the link in the error message: http://bit.ly/2tRViJ9

It is considered a good practice to provide code following ES5 standard in npm packages as the CRA docs say also.

@koskimas
Copy link
Collaborator

koskimas commented May 27, 2018

It is considered a good practice to provide code following ES5 standard in npm packages as the CRA docs say also.

Yup, for browsers. But as I said, browsers are not officially supported by this project. Writing code in ES5 in 2018 for node projects would be insane.

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

2 participants