[Pkg-javascript-devel] Bug#969986: Bug#969986: Bug#969986: npm: Error: Cannot find module 'semver'

Jonas Smedegaard jonas at jones.dk
Wed Sep 9 20:11:10 BST 2020


Quoting Kevin Locke (2020-09-09 20:32:01)
> Did you try installing to a chroot:
> 
> debootstrap testing npm-chroot && chroot npm-chroot sh -c 'apt install -y npm && npm --version'

That's a fair questions: autopkgtest has its own set of dependencies 
which might hide this issue.

I tried above command just now (inside another chroot), and it failed:

internal/modules/cjs/loader.js:968
  throw err;
  ^

Error: Cannot find module 'semver'
Require stack:
- /usr/share/npm/lib/utils/unsupported.js
- /usr/share/npm/bin/npm-cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/share/npm/lib/utils/unsupported.js:2:14)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/share/npm/lib/utils/unsupported.js',
    '/usr/share/npm/bin/npm-cli.js'
  ]
}

The package node-semver _was_ installed.

Installing npm into a clean pbuilder chroot (either sid or bullseye) and 
running "npm --version" does not fail, however.

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20200909/bedfcd30/attachment.sig>


More information about the Pkg-javascript-devel mailing list