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

Failed to install ndb #20

Closed
terapackets opened this Issue Jul 22, 2018 · 14 comments

Comments

Projects
None yet
@terapackets
Copy link

terapackets commented Jul 22, 2018

Steps to reproduce

jsmith@jsmith-hp1:~/projs/$ sudo npm install -g ndb
/usr/bin/ndb -> /usr/lib/node_modules/ndb/ndb.js

> deasync@0.1.13 install /usr/lib/node_modules/ndb/node_modules/deasync
> node ./build.js

`linux-x64-node-8` exists; testing
Binary is fine; exiting

> node-pty-prebuilt@0.7.3 install /usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js

prebuild-install WARN install EACCES: permission denied, mkdir '/usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt/build'
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt/build'
gyp ERR! System Linux 3.19.0-65-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

Tell us about your environment:

  • ndb version: n/a (initial installation)
  • Platform / OS version: ubuntu 14.04 64bit.
  • Node.js version: 8.4.0

What steps will reproduce the problem?

Seeing the error mkdir '/usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt/build', I tried to
manually created directory '/usr/lib/node_modules/ndb/node_modules/node-pty-prebuilt/' but I got the same error when I tried to install it again.

What is the expected result?

What happens instead?

@lilywang711

This comment has been minimized.

Copy link

lilywang711 commented Jul 23, 2018

I failed to install ndb either.

node -v
v8.11.3
npm -v
5.6.0

`
lily:~ $ sudo npm install -g ndb
Password:
/usr/local/bin/ndb -> /usr/local/lib/node_modules/ndb/ndb.js

deasync@0.1.13 install /usr/local/lib/node_modules/ndb/node_modules/deasync
node ./build.js

darwin-x64-node-8 exists; testing
Binary is fine; exiting

node-pty-prebuilt@0.7.3 install /usr/local/lib/node_modules/ndb/node_modules/node-pty-prebuilt
prebuild-install || node scripts/install.js

prebuild-install WARN install EACCES: permission denied, access '/Users/lily/.npm'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ndb/node_modules/node-pty-prebuilt/build'
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/ndb/node_modules/node-pty-prebuilt
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

puppeteer@1.6.0 install /usr/local/lib/node_modules/ndb/node_modules/puppeteer
node install.js

ERROR: Failed to download Chromium r571375! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium'
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/usr/local/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-pty-prebuilt@0.7.3 (node_modules/ndb/node_modules/node-pty-prebuilt):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-pty-prebuilt@0.7.3 install: prebuild-install || node scripts/install.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.6.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.6.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lily/.npm/_logs/2018-07-23T01_31_34_361Z-debug.log
`

@liubin915249126

This comment has been minimized.

Copy link

liubin915249126 commented Jul 24, 2018

i meet this problem either

@ak239

This comment has been minimized.

Copy link
Collaborator

ak239 commented Jul 24, 2018

Some installation problems may be resolved in just published 1.0.8 but I am still looking into this problem.

@davidfregoli

This comment has been minimized.

Copy link

davidfregoli commented Jul 24, 2018

Encountering the same on 1.0.8 (Ubuntu 16.04.4)

@ascarter

This comment has been minimized.

Copy link

ascarter commented Jul 24, 2018

I see this as well:

$ node --version
v10.7.0

$ npm --version
6.2.0

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G65

Installed node using official package installer.

@ak239

This comment has been minimized.

Copy link
Collaborator

ak239 commented Jul 25, 2018

Some permissions related problems are highlighted in following thread: GoogleChrome/puppeteer#375
I will check how it works with official Node.js installer by myself as well.

@davidfregoli

This comment has been minimized.

Copy link

davidfregoli commented Jul 25, 2018

Thanks, worked for me with --unsafe-perm=true

@raskanskyz

This comment has been minimized.

Copy link

raskanskyz commented Jul 25, 2018

sudo npm install -g ndb --unsafe-perm=true --allow-root ftw

@ak239 ak239 referenced this issue Jul 25, 2018

Closed

Install error #51

@GoBrianGo

This comment has been minimized.

Copy link

GoBrianGo commented Jul 26, 2018

when I run ndb node xxx.js,it can't work.Here is the error message.
(node:45413) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
(node:45413) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@wnm3

This comment has been minimized.

Copy link

wnm3 commented Jul 26, 2018

@raskanskyz solution to use:
sudo npm install -g ndb --unsafe-perm=true --allow-root ftw
solved my problems on MacOS install of ndb

wnm3MacBook:wild wnm3$ node --version
v8.11.2
wnm3MacBook:wild wnm3$ npm --version
5.6.0
wnm3MacBook:wild wnm3$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G65

details showing example failure followed by working solution:

wnm3MacBook:wild wnm3$ sudo npm install -g ndb
/usr/local/bin/ndb -> /usr/local/lib/node_modules/ndb/ndb.js

> deasync@0.1.13 install /usr/local/lib/node_modules/ndb/node_modules/deasync
> node ./build.js

`darwin-x64-node-8` exists; testing
Binary is fine; exiting

> ndb-node-pty-prebuilt@0.8.0 install /usr/local/lib/node_modules/ndb/node_modules/ndb-node-pty-prebuilt
> node scripts/install.js

(node:79147) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ndb/node_modules/ndb-node-pty-prebuilt/build'
(node:79147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:79147) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

> puppeteer@1.6.1 install /usr/local/lib/node_modules/ndb/node_modules/puppeteer
> node install.js

ERROR: Failed to download Chromium r575458! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
{ Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium'
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/usr/local/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.6.1 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the puppeteer@1.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/wnm3/.npm/_logs/2018-07-26T15_38_06_781Z-debug.log

removed and then used his solution:

wnm3MacBook:wild wnm3$ sudo npm remove -g ndb
up to date in 0.045s

wnm3MacBook:wild wnm3$ sudo npm install -g ndb --unsafe-perm=true --allow-root ftw
/usr/local/bin/ndb -> /usr/local/lib/node_modules/ndb/ndb.js

> deasync@0.1.13 install /usr/local/lib/node_modules/ndb/node_modules/deasync
> node ./build.js

`darwin-x64-node-8` exists; testing
Binary is fine; exiting

> ndb-node-pty-prebuilt@0.8.0 install /usr/local/lib/node_modules/ndb/node_modules/ndb-node-pty-prebuilt
> node scripts/install.js


> puppeteer@1.6.1 install /usr/local/lib/node_modules/ndb/node_modules/puppeteer
> node install.js

Downloading Chromium r575458 - 80.4 Mb [====================] 100% 0.0s 
Chromium downloaded to /usr/local/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium/mac-575458

> ndb-node-pty-prebuilt@0.8.0 postinstall /usr/local/lib/node_modules/ndb/node_modules/ndb-node-pty-prebuilt
> node scripts/post-install.js


> ndb@1.0.11 postinstall /usr/local/lib/node_modules/ndb
> node install.js

+ ndb@1.0.11
+ ftw@0.0.1
added 169 packages in 15.75s
@terapackets

This comment has been minimized.

Copy link
Author

terapackets commented Jul 27, 2018

I used the command sudo npm install -g ndb --unsafe-perm=true --allow-root and it works well for me. So close this ticket. Thanks everyone!

@mjpowersjr

This comment has been minimized.

Copy link

mjpowersjr commented Jul 29, 2018

Adding the previously mentioned additional cli args worked for me on Ubuntu 18.04. It would be nice if the README was updated to include this information.

@maple-leaf

This comment has been minimized.

Copy link

maple-leaf commented Aug 8, 2018

result of run commnad: sudo npm install -g ndb --unsafe-perm=true --allow-root ftw (failed)

image

result of run comand: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 sudo npm install -g ndb --unsafe-perm=true --allow-root ftw (success)

image

I dont know why, but with PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 set, chromium being downloaded successful.

node version: 10.7.0
npm version: 6.2.0
os: mac

@ak239

This comment has been minimized.

Copy link
Collaborator

ak239 commented Aug 8, 2018

@aslushnikov what do you think about last comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment