Tuesday, 4 April 2017

Errors using 'npm run build'

I am using react-boilerplate (https://www.github.com/react-boilerplate) to create a small app. While running the build command (npm run build) for my app, I see the following warning:

WARNING in asset size limit: 
The following asset(s) exceed the recommended size limit (250 kB)
This can impact web performance.
Assets:
0.a4edf518ed555866f5cd.chunk.js (286 kB)

And the following errors:

ERROR in 0.a4edf518ed555866f5cd.chunk.js from UglifyJs
Unexpected token name «i», expected punc «;» 
[0.a4edf518ed555866f5cd.chunk.js:8982,11]

And:

npm ERR! Linux 3.19.0-80-generic
npm ERR! argv "/home/ahsan/.nvm/versions/node/v6.9.4/bin/node" "/home/ahsan/.nvm/versions/node/v6.9.4/bin/npm" "run" "build"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! react-boilerplate@3.4.0 build: cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the react-boilerplate@3.4.0 build script 'cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress'.
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 react-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls react-boilerplate
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ahsan/Desktop/i2x/npm-debug.log`

I can't figure out what this problem might be, need help solving this problem.



via Rizvified

No comments:

Post a Comment