Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1024458

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

From Kevin Locke <kevin@kevinlocke.name>
Newsgroups linux.debian.bugs.dist
Subject Bug#969986: [Pkg-javascript-devel] Bug#969986: npm: Error: Cannot find module 'semver'
Date 2020-09-09 20:50 +0200
Message-ID <ANdkm-4eK-5@gated-at.bofh.it> (permalink)
References <ANcxX-3HQ-5@gated-at.bofh.it> <ANdaG-4be-3@gated-at.bofh.it> <ANcxX-3HQ-5@gated-at.bofh.it> <ANdaG-4be-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2020-09-09 at 20:20 +0200, Xavier wrote:
> Control: tags -1 + moreinfo
> 
> Le 09/09/2020 à 19:54, Kevin Locke a écrit :
>> Package: npm
>> Version: 6.14.8+ds-1
>> Severity: important
>> 
>> Dear Maintainer,
>> 
>> When I run `npm --version` (or any subcommand), it prints:
>> 
>> 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'
>>   ]
>> }
>> 
>> I am able to reproduce the error in a fresh chroot with:
>> 
>> debootstrap testing npm-chroot
>> chroot npm-chroot sh -c 'apt install -y npm && npm --version'
>> 
>> Any ideas?
> 
> Hi,
> 
> I'm unable to reproduce this bug when adding this autopkgtest
> (node-semver is a dependency of npm):
> 
> Test-Command: npm --version
> Depends: @
> Restrictions: superficial
> Features: test-name=npm-version
> 
> 
> Result is:
> autopkgtest [20:16:49]: test npm-version: npm --version
> autopkgtest [20:16:49]: test npm-version: [-----------------------
> 6.14.8
> autopkgtest [20:16:49]: test npm-version: -----------------------]
> autopkgtest [20:16:49]: test npm-version:  - - - - - - - - - - results
> npm-version          PASS (superficial)

I'm sorry, but I'm not familiar enough with autopkgtest to confirm.
I'll start reading about autopkgtest to see if I can confirm or come up
with a repro.

Did you try installing to a chroot:

debootstrap testing npm-chroot && chroot npm-chroot sh -c 'apt install -y npm && npm --version'

Thanks,
Kevin

Back to linux.debian.bugs.dist | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#969986: npm: Error: Cannot find module 'semver' Kevin Locke <kevin@kevinlocke.name> - 2020-09-09 20:00 +0200
  Bug#969986: [Pkg-javascript-devel] Bug#969986: npm: Error: Cannot find module 'semver' Xavier <yadd@debian.org> - 2020-09-09 20:40 +0200
    Bug#969986: [Pkg-javascript-devel] Bug#969986: npm: Error: Cannot find module 'semver' Kevin Locke <kevin@kevinlocke.name> - 2020-09-09 20:50 +0200
      Bug#969986: [Pkg-javascript-devel] Bug#969986: Bug#969986: npm: Error: Cannot find module 'semver' Jonas Smedegaard <jonas@jones.dk> - 2020-09-09 21:20 +0200
        Bug#969986: [Pkg-javascript-devel] Bug#969986: Bug#969986: npm: Error: Cannot find module 'semver' Kevin Locke <kevin@kevinlocke.name> - 2020-09-09 22:20 +0200

csiph-web