-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Node EventEmitter polyfill includes ES6 code and breaks UglifyJS #1020
Comments
Can you try downgrading Node to 6.7 or some earlier version? It seems like at some point it started using ES6 syntax which means that syntax now becomes part of your modules if you use npm modules that import Node core modules. Which is confusing as hell. 😄 It would help if you included a project reproducing the problem. |
Alright, is node version 6.7 before it started using ES6 syntax? |
Yes it is. I think I can clarify @gaearon 's explanation for you 😄 :
Solution:
@gaearon should we write something about this in Readme? |
@dvkndn Thanks, your explanation was to the point, however I've downgraded to node version |
Can you check the version of Node and NPM in the Mac (when everything is fine) then? Also, it would be helpful if we can see the repo or a minimum version of it to reproduce the issue |
I didn't mean to imply 6.7 is the specific version fixing the problem. It's just worth trying to see if any older versions work. |
Regardless of the nodejs and npm version on the mac the scripts run absolutely fine, I've ejected to webpack for the time being and it's working like that -- I think it's something ubuntu related, I can't share the project it's currently in but I will try at some point to reproduce the issue and share that project |
I got the same error when running against 6.4 and 6.9 (in that order). Everything runs fine on the mac but not on ubunutu. Is there any way to resolve this issue? |
Happen to me as well, Im running 6.6.0, runs successfully on my mac, but not in ubuntu. |
Happens to me as well with Node 6.9.1 on Debian. Works perfect at my MacBook :/ |
Due to the feedback we've had here from people saying they have the same issue, i'm not going to bother creating a project for it, i'm sure this can be replicated by taking any project using |
Closing in favor of #1023 which was filed later but which has more details about the issue. |
@Grantlyk hey, were you able to resolve this issue on ubuntu? |
This was fixed in 0.8.2: #1023 (comment). |
The fix is here: https://github.com/facebookincubator/create-react-app/pull/1194/files. |
thanks @gaearon |
Description
When I run the
npm run build
command I expect abuild
folder to be created and populated with my expected transpiled resultsActual behavior
Instead I get the following error;
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):[email protected]
node -v
: v6.9.1npm -v
: v3.10.9Then, specify:
Additional
I've tried this on different node versions on Mac OS and everything runs fine there
The text was updated successfully, but these errors were encountered: