react-boilerplate: Build error while running npm run build

While running the build command for my app,i see the following warning and error:

`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)

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

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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@rizvified I too am working on a project with this boilerplate and React-Redux-Form. I figure out the problem. RRF has a dependency of Shallow-Compare. The version in RRF is one behind the latest release. 1.2.1.

Updating this dependency allows the package to build successfully. It’s a hack for now.

npm ERR! Exit status 2

IIRC, this is a mysterious undocumented error code.

Have you tried reinstalling dependencies?