Nwb: Installing nwb failed due to `Failed at the [email protected] install script`

Created on 26 Jan 2018  路  5Comments  路  Source: insin/nwb

This issue is a:

  • Question / support request

I ran npm install -g nwb but it failed to Failed at the [email protected] install script.
My node -v is v8.9.1 & npm 5.6.0

Most helpful comment

Please make phantom a peer dependency.

All 5 comments

Does this work?

npm install -g --unsafe-perm nwb

I have encountered a similar issue today, but not sure if @ivanasetiawan has the same one?
In my situation, the output just mentioned that :
tar (child): bzip2: Cannot exec: No such file or directory
Cause I'm using a very minimal docker debian base image, so I don't have bzip2 that tar need to uncompress .bz2 file for installing phantomjs-prebuilt.
So I just install it and everything goes cool.
apt-get install bzip2

Full related error information :

root@32f0ad0b58ca:/# npm install -g nwb
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: Use uuid module instead
/usr/bin/nwb -> /usr/lib/node_modules/nwb/lib/bin/nwb.js

> [email protected] install /usr/lib/node_modules/nwb/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0


> [email protected] install /usr/lib/node_modules/nwb/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:199:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
  killed: false,
  code: 2,
  signal: null,
  cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:199:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:920:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
/usr/lib
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/nwb/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm ERR! Linux 4.4.27-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "nwb"
npm ERR! node v6.12.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node install.js'.
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 phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log
npm ERR! code 1

OK after trying many things.. I solved this error by uninstalling yarn.

Any chance you could make Phantom a peer dependency? I'm behind a proxy at work and cannot install PhantomJS.

As a temporary workaround I create a dummy executable in /usr/local/bin but it's not ideal. I'd like to be able to have my team install this and not need to fake having Phantom installed (or have Phantom installed at all):

#!/bin/bash

echo 2.1.1

And then npm i -g --unsafe-perm nwb

At some point they're supposed to fix what's blocking Phantom for us, but it'd be nice to not strictly require it to use NWB's other functionality

Please make phantom a peer dependency.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

loklaan picture loklaan  路  3Comments

AquiGorka picture AquiGorka  路  3Comments

bluce1017 picture bluce1017  路  5Comments

LeoDT picture LeoDT  路  5Comments

insin picture insin  路  6Comments