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

Problem react-x18n when run command (npm run build) #2

Open
seila23 opened this issue Sep 12, 2017 · 2 comments
Open

Problem react-x18n when run command (npm run build) #2

seila23 opened this issue Sep 12, 2017 · 2 comments

Comments

@seila23
Copy link

seila23 commented Sep 12, 2017

I have problem with react-x18n when I use command (npm run build) and show like this :

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

static/js/main.29abe3f6.js from UglifyJs
Unexpected token: name (React) [./~/react-x18n/index.js:3,0][static/js/main.29abe3f6.js:397,4]

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: react-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'react-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the reactjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs reactjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls reactjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\postTransfer_webApp\npm-debug.log

@marco-a
Copy link
Owner

marco-a commented Sep 14, 2017

This seems to be an issue related to uglifyjs and not react-x18n:

webpack/webpack#2972

I suggest that you try to transpile the react-x18n source code from ES6 to ES5 (either manually or with babel) and see what happens.

@seila23
Copy link
Author

seila23 commented Sep 14, 2017

may u please update react-x18n to ES6 ?

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