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

error to build when using npm run build (personality-text-summary package) #1418

Closed
kimdotnet opened this issue Jan 20, 2017 · 1 comment
Closed

Comments

@kimdotnet
Copy link

kimdotnet commented Jan 20, 2017

Iam using IBM Personality Insight text-summary package, and then got the errors below.
This is the error happened, when I tried to create production build using npm run build using create-react-app cli:

static/js/main.b979c3aa.js from UglifyJs
SyntaxError: Unexpected token: name (I18nData) [./~/personality-text-summary/lib/i18n/v2/index.js:27,0]


npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Kim\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v4.5.0
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! test@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test@0.1.0 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 test 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 test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls test
npm ERR! There is likely additional logging output above.
@kimdotnet kimdotnet changed the title error to build when using npm run build (create-react-app cli) error to build when using npm run build (personality-text-summary package) Jan 20, 2017
@gaearon
Copy link
Contributor

gaearon commented Jan 20, 2017

It is using ES6 classes in the source code but Uglify doesn't understand them yet, and crashes. Generally we don't support using libraries that use ES6 in the source code at the moment.

You could either eject and add this library’s directory to the list of directories processed with Babel inside the Webpack config, or you could persuade maintainers of that library to compile it to ES5 before publishing.

I hope this helps!

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

No branches or pull requests

2 participants