Skip to content
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

Cannot find module 'compute-gammainc' #1255

Closed
kilrau opened this issue Sep 30, 2019 · 3 comments · Fixed by #1256
Closed

Cannot find module 'compute-gammainc' #1255

kilrau opened this issue Sep 30, 2019 · 3 comments · Fixed by #1256
Assignees
Labels
bug Something isn't working

Comments

@kilrau
Copy link
Contributor

kilrau commented Sep 30, 2019

Background

xud doesn't start because of a missing module

Your environment

  • version of xud: master
  • which operating system (uname -a on *Nix): ubuntu 18.04.3
  • version of btcd, bitcoind, ltcd, litecoind, geth, parity, raiden, lnd or other chain backend:
  • any other relevant environment details:

Steps to reproduce

./xud

Expected behaviour

xud starts

Actual behaviour

xud fails to start with

kilrau@K-Yoga:~/xud-simnet/xud/bin$ ./xud
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'compute-gammainc'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/kilrau/xud-simnet/xud/node_modules/distributions-poisson-cdf/lib/number.js:5:16)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/kilrau/xud-simnet/xud/node_modules/distributions-poisson-quantile/lib/number.js:5:11)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/kilrau/xud-simnet/xud/node_modules/distributions-poisson-quantile/lib/index.js:16:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)

It looks like compute-gammainc was introduced with https://github.com/ExchangeUnion/xud/pull/1179/files#diff-36018a6a9e1de1798516799b84841318R2721

@kilrau kilrau added bug Something isn't working P1 top priority labels Sep 30, 2019
@kilrau kilrau self-assigned this Sep 30, 2019
@kilrau kilrau assigned sangaman and unassigned kilrau Sep 30, 2019
@kilrau
Copy link
Contributor Author

kilrau commented Sep 30, 2019

Manually running npm prune --dev solved the issue. xud should run this automatically.

@kilrau
Copy link
Contributor Author

kilrau commented Sep 30, 2019

Reproduced: https://paste.ubuntu.com/p/M5hvPnWhJv/
This time running npm prune --dev did NOT fix it: https://paste.ubuntu.com/p/bbF3DzVpdz/

@sangaman
Copy link
Collaborator

This is a bug with newer versions of npm. Running npm install with npm 6.4.1 or 6.9.0 does not encounter this issue. Running with npm 6.11.3 does encounter this issue.

sangaman added a commit that referenced this issue Sep 30, 2019
@kilrau kilrau removed the P1 top priority label Sep 30, 2019
michael1011 pushed a commit that referenced this issue Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants