ndb icon indicating copy to clipboard operation
ndb copied to clipboard

Nothing but a flashing cursor when I get ndb installed

Open rainabba opened this issue 7 years ago • 3 comments

I am running in WSL, Ubuntu 16.04.4 LTS on Windows 10 1803 and so far can't get ndb to anything more than give me a flashing prompt once I get it installed (though that appears inconsistent and ineffectual at the moment).

I tried the following with my default node/npm install, then I cleaned and installed nvm and redid things there to get yet ANOTHER result. So, no ndb goodness for me on this machine at least (going to try my laptop in a moment).

Am I having an issue with my environment somehow (how to troubleshoot?) or is this ndb and what's going on?

Environment

$ node -v
v8.11.3
$ npm -v
5.6.0

I tried npm i -g ndb && ndb lib/ which is all I expected to need, but it just sat there so I tried the following (I've cleaned it a bit, but no relevant steps were omitted):

After first install attempt

rainabba$ ndb -v
[STUCK HERE]
^C
rainabba$ which ndb
/usr/local/bin/ndb
$ /home/rainabba/npm/bin/ndb -v
[STUCK HERE]
^C
$ node /home/rainabba/npm/bin/ndb -v
[STUCK HERE]
^C

Notice that I get a different result with the following 2 attempts to npm install -g ndb. In one case, there's an error with uglify-es in the postinstall script and in the other, I see puppeteer install and no errors. In either case, ndb does nothing for me. No errors, not log output, no windows. Nada.

rainabba$ npm install -g ndb && which ndb
/home/rainabba/npm/bin/ndb -> /home/rainabba/npm/lib/node_modules/ndb/ndb.js

> [email protected] postinstall /home/rainabba/npm/lib/node_modules/ndb
> node install.js

module.js:549
    throw err;
    ^

Error: Cannot find module 'uglify-es'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/rainabba/npm/lib/node_modules/ndb/scripts/build_release_application.js:12:18)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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!     /home/rainabba/.npm/_logs/2018-07-23T17_15_34_065Z-debug.log
rainabba$ npm install -g ndb && which ndb
/home/rainabba/npm/bin/ndb -> /home/rainabba/npm/lib/node_modules/ndb/ndb.js

> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/deasync
> node ./build.js

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

> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js


> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/puppeteer
> node install.js

Downloading Chromium r571375 - 101.4 Mb [====================] 100% 0.0s
Chromium downloaded to /home/rainabba/npm/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium/linux-571375

> [email protected] postinstall /home/rainabba/npm/lib/node_modules/ndb/node_modules/node-pty-prebuilt
> node scripts/post-install.js


> [email protected] postinstall /home/rainabba/npm/lib/node_modules/ndb
> node install.js

+ [email protected]
added 182 packages in 12.196s
/usr/local/bin/ndb
rainabba$ ndb lib/index.js
_
[Just sits here and no new windows come up]

Install nvm (cleanup a bit first), then repeat the attempt

# Cleanup previous attempts to install nvm using apt, which resulted in me seeing the message leading me to the script below
rainabba$ sudo apt remove nvm
# Google nvm and find the following command at https://github.com/creationix/nvm#install-script
rainabba$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Cleanup recommended from the nvm install script
rainabba$ nvm use system && npm uninstall -g ndb forever grunt-cli ndb nodemon
rainabba$ npm -v
5.6.0
rainabba$ npm install -g ndb
/home/rainabba/npm/bin/ndb -> /home/rainabba/npm/lib/node_modules/ndb/ndb.js

> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/deasync
> node ./build.js

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

> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js


> [email protected] install /home/rainabba/npm/lib/node_modules/ndb/node_modules/puppeteer
> node install.js

Downloading Chromium r571375 - 101.4 Mb [====================] 100% 0.0s
Chromium downloaded to /home/rainabba/npm/lib/node_modules/ndb/node_modules/puppeteer/.local-chromium/linux-571375

> [email protected] postinstall /home/rainabba/npm/lib/node_modules/ndb/node_modules/node-pty-prebuilt
> node scripts/post-install.js


> [email protected] postinstall /home/rainabba/npm/lib/node_modules/ndb
> node install.js

+ [email protected]
added 182 packages in 15.733s
rainabba$ ndb lib/
(node:1576) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at assert (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/helper.js:282:11)
    at Function.launch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/Launcher.js:106:7)
    at Function.launch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/Puppeteer.js:26:21)
    at main (/usr/local/lib/node_modules/ndb/ndb.js:35:35)
    at <anonymous>
(node:1576) 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: 3)
(node:1576) [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.
rainabba$ npm install
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN [email protected] requires a peer of webpack@^1.0.0 || ~2.2.0-rc.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 18.262s
rainabba$ ndb lib/
(node:1629) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at assert (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/helper.js:282:11)
    at Function.launch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/Launcher.js:106:7)
    at Function.launch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer/lib/Puppeteer.js:26:21)
    at main (/usr/local/lib/node_modules/ndb/ndb.js:35:35)
    at <anonymous>
(node:1629) 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: 3)
(node:1629) [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.

rainabba avatar Jul 23 '18 18:07 rainabba

Thank you for your great report! Some build/install issues are fixed were landed in latest 1.10 version, it may help but most likely not.

It looks like pptr does not support WSL, you could check following links:

  • https://github.com/GoogleChrome/puppeteer/issues?utf8=%E2%9C%93&q=%22Chromium+revision+is+not+downloaded%22
  • https://github.com/GoogleChrome/puppeteer/issues/1837

alexkozy avatar Jul 25 '18 22:07 alexkozy

After migration to carlo I think that ndb might work if you have Chrome preinstalled. Could you give a chance to latest [email protected]?

alexkozy avatar Dec 02 '18 22:12 alexkozy

Based on latest comment in puppeteer thread: https://github.com/GoogleChrome/puppeteer/issues/1837#issuecomment-503481364 It looks like ndb might works well with WSL2.

alexkozy avatar Jun 25 '19 05:06 alexkozy