Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6002

WSL : mocha from sudo apt install mocha crashes with fresh install

$
0
0

As you can see below, I started with state of which mocha returning nothing (not installed), then installed it with sudo apt install mocha, and simply ran mocha hoping to receive some sort of "use /help option for more info".

However, instead, I receive this

Error: Cannot find module 'glob'

Why is this?

REDACTED:/mnt/d/SourceTree$ which mochaREDACTED:/mnt/d/SourceTree$ sudo apt install mochaReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:  gyp libauthen-sasl-perl libdata-dump-perl libencode-locale-perl libfile-basedir-perl libfile-desktopentry-perl libfile-listing-perl     libfile-mimeinfo-perl libfont-afm-perl libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl  libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl  libio-html-perl libio-socket-ssl-perl libio-stringy-perl libipc-system-simple-perl libjs-is-typedarray libjs-psl  libjs-typedarray-to-buffer liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libnet-dbus-perl libnet-http-perl        libnet-smtp-ssl-perl libnet-ssleay-perl libnode-dev libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib libtie-ixhash-perl       libtimedate-perl libtry-tiny-perl liburi-perl libuv1-dev libwww-perl libwww-robotrules-perl libx11-protocol-perl libxml-parser-perl     libxml-twig-perl libxml-xpathengine-perl perl-openssl-defaults python-pkg-resources python2 python2-minimal python2.7  python2.7-minimal python3-cliapp python3-markdown python3-packaging python3-pyparsing python3-ttystatus xdg-utilsUse 'sudo apt autoremove' to remove them.Suggested packages:  chaiThe following NEW packages will be installed:  mocha0 upgraded, 1 newly installed, 0 to remove and 123 not upgraded.Need to get 0 B/113 kB of archives.After this operation, 675 kB of additional disk space will be used.Selecting previously unselected package mocha.(Reading database ... 72405 files and directories currently installed.)Preparing to unpack .../mocha_7.0.1+ds1-2_all.deb ...Unpacking mocha (7.0.1+ds1-2) ...Setting up mocha (7.0.1+ds1-2) ...Processing triggers for man-db (2.9.1-1) ...REDACTED:/mnt/d/SourceTree$ mochanode:internal/modules/cjs/loader:936  throw err;  ^Error: Cannot find module 'glob'Require stack:- /usr/share/nodejs/mocha/lib/utils.js- /usr/share/nodejs/mocha/bin/mocha    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)    at Function.Module._load (node:internal/modules/cjs/loader:778:27)    at Module.require (node:internal/modules/cjs/loader:1005:19)    at require (node:internal/modules/cjs/helpers:102:18)    at Object.<anonymous> (/usr/share/nodejs/mocha/lib/utils.js:15:12)    at Module._compile (node:internal/modules/cjs/loader:1103:14)    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)    at Module.load (node:internal/modules/cjs/loader:981:32)    at Function.Module._load (node:internal/modules/cjs/loader:822:12)    at Module.require (node:internal/modules/cjs/loader:1005:19) {  code: 'MODULE_NOT_FOUND',  requireStack: ['/usr/share/nodejs/mocha/lib/utils.js','/usr/share/nodejs/mocha/bin/mocha'  ]}

Viewing all articles
Browse latest Browse all 6002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>