question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`npm run build` fails for cerebral-todomvc

See original GitHub issue

System: Debian GNU/Linux 8.6 (jessie). Linux version: 4.7.0-0.bpo.1-amd64 Node version: 6.9.1 npm version: 3.10.8 react-scripts version: 0.7.0

Just made a fresh clone of the Cerebral repo and ran npm install and npm run setup which gives me the following error message:

pacha@xibalba:~/web/cerebral/cerebral$ npm run setup

> cerebral-monorepo@0.0.0 setup /home/pacha/web/cerebral/cerebral
> lerna bootstrap

Lerna v2.0.0-beta.30
Independent Versioning Mode
Bootstrapping 11 packages
Installing external dependencies
Symlinking packages and binaries
Prepublishing packages
Errored while running BootstrapCommand.execute
Error: Command failed: npm run prepublish 

npm ERR! Linux 4.7.0-0.bpo.1-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! cerebral-todomvc@0.2.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cerebral-todomvc@0.2.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 cerebral-todomvc 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 cerebral-todomvc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cerebral-todomvc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pacha/web/cerebral/cerebral/packages/cerebral-todomvc/npm-debug.log

npm ERR! Linux 4.7.0-0.bpo.1-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "prepublish"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! cerebral-todomvc@0.2.0 prepublish: `npm run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cerebral-todomvc@0.2.0 prepublish script 'npm run 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 cerebral-todomvc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cerebral-todomvc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cerebral-todomvc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pacha/web/cerebral/cerebral/packages/cerebral-todomvc/npm-debug.log

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm ERR! Linux 4.7.0-0.bpo.1-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "setup"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! cerebral-monorepo@0.0.0 setup: `lerna bootstrap`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cerebral-monorepo@0.0.0 setup script 'lerna bootstrap'.
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 cerebral-monorepo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     lerna bootstrap
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cerebral-monorepo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cerebral-monorepo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pacha/web/cerebral/cerebral/npm-debug.log

When running npm run build in the packages/cerebral-todomvc directory, I get:

pacha@xibalba:~/web/cerebral/cerebral/packages/cerebral-todomvc$ npm run build

> cerebral-todomvc@0.2.0 build /home/pacha/web/cerebral/cerebral/packages/cerebral-todomvc
> react-scripts build

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

static/js/main.b4f163eb.js from UglifyJs
Unexpected character '`' [/usr/lib/nodejs/events.js:260,0]


npm ERR! Linux 4.7.0-0.bpo.1-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! cerebral-todomvc@0.2.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cerebral-todomvc@0.2.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 cerebral-todomvc 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 cerebral-todomvc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cerebral-todomvc
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pacha/web/cerebral/cerebral/packages/cerebral-todomvc/npm-debug.log

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:57 (53 by maintainers)

github_iconTop GitHub Comments

1reaction
henri-hulskicommented, Nov 9, 2016

@Guria I found the issue. cerebral/addressbar also requires EventEmitter and gets imported by the router. When replacing the emitter with eventemitter3 in cerebral, function-tree and addressbar everything works well.

@christianalfoni Should I make PRs for cerebral and addressbar and do you have any preferences which emitter to use?

BTW There is now an issue about EventEmitter on CRA: facebookincubator/create-react-app#1023

1reaction
Guriacommented, Nov 7, 2016

yes, it’s a npm built in behaviour

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm run build fails for EventEmitter · Issue #1023 - GitHub
The purported cause is that CRA does not transpile "dependencies" into ES5 and then the UglifyJS plugin fails when it encounters ES6 code....
Read more >
npm run build failed - node.js - Stack Overflow
I have used microsoft-graph-client and isomorphic-fetch npm package in our project for accessing Microsoft Graph, but while running npm run ...
Read more >
Resolve NPM Error When Installing TODO-MVC Tutorial in ...
The key to avoiding an installation error is running commands from the relevant directory instead of the root directory.
Read more >
Troubleshooting - Create React App
It is reported that npm run build can fail on machines with limited memory and no swap space, which is common in cloud...
Read more >
Declarative state and side effects management for popular ...
Failed at the cerebral-todomvc@0.2.0 prepublish script 'npm run build'. npm ERR! Make sure you have the latest version of node.js and npm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found