Quantcast
Channel: npm forum - Topics tagged triaged
Viewing all articles
Browse latest Browse all 30

[BLOCKER] Starting from npm 5, cannot uninstall package, if install source was deleted

$
0
0

@cravler wrote:

What I Wanted to Do

Tried to run npm rm -g dummy-pkg and expected what package will be removed.

What Happened Instead

NPM show error: ENOENT: no such file or directory, stat '/var/www/dummy-pkg-0.0.1.tgz'

Reproduction Steps

mkdir dummy-pkg
cd dummy-pkg
npm init -y
cd ..
npm pack dummy-pkg
rm -rf dummy-pkg
npm i -g dummy-pkg-0.0.1.tgz
rm dummy-pkg-0.0.1.tgz
npm rm -g dummy-pkg

Details

Error output:

npm ERR! path /var/www/dummy-pkg-0.0.1.tgz
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall stat
npm ERR! enoent ENOENT: no such file or directory, stat '/var/www/dummy-pkg-0.0.1.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-01-07T11_33_21_000Z-debug.log

/root/.npm/_logs/2019-01-07T11_33_21_000Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'rm',
1 verbose cli   '-g',
1 verbose cli   'dummy-pkg' ]
2 info using npm@6.6.0-next.0
3 info using node@v10.15.0
4 verbose npm-session 69eadf7c7607723c
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 timing stage:loadCurrentTree Completed in 27ms
8 silly install loadIdealTree
9 silly install cloneCurrentTreeToIdealTree
10 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
11 silly install loadShrinkwrap
12 timing stage:loadIdealTree:loadShrinkwrap Completed in 4ms
13 silly uninstall loadAllDepsIntoIdealTree
14 silly install loadAllDepsIntoIdealTree
15 silly fetchPackageMetaData error for dummy-pkg@file:../../../var/www/dummy-pkg-0.0.1.tgz ENOENT: no such file or directory, stat '/var/www/dummy-pkg-0.0.1.tgz'
16 timing stage:rollbackFailedOptional Completed in 0ms
17 timing stage:runTopLevelLifecycles Completed in 43ms
18 verbose stack Error: ENOENT: no such file or directory, stat '/var/www/dummy-pkg-0.0.1.tgz'
19 verbose cwd /var/www
20 verbose Linux 4.4.0-127-generic
21 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "rm" "-g" "dummy-pkg"
22 verbose node v10.15.0
23 verbose npm  v6.6.0-next.0
24 error path /var/www/dummy-pkg-0.0.1.tgz
25 error code ENOENT
26 error errno -2
27 error syscall stat
28 error enoent ENOENT: no such file or directory, stat '/var/www/dummy-pkg-0.0.1.tgz'
29 error enoent This is related to npm not being able to find a file.
30 verbose exit [ -2, true ]

Platform Info

$ npm --versions
{ npm: '6.6.0-next.0',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.15.0',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '6.8.275.32-node.45',
  zlib: '1.2.11' }

$ node -p process.platform
linux

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 30

Trending Articles