[BUG] npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/tls-test' -> '/usr/local/lib/node_modules/.tls-test-ow7IxLcQ'
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
installation of https://tls-test.npmjs.com/tls-test-1.0.0.tgz fails
i have tried manually rename '/usr/local/lib/node_modules/tls-test' -> '/usr/local/lib/node_modules/.tls-test-ow7IxLcQ'
clearitg 'usr/local/lib/node_modules/.tls-test-ow7IxLcQ'
clearing cache
downgrade and upgrading npm
when i was trying to solve this problem myself sometimes it throws 'error handler never called error'
Expected Behavior
install https://tls-test.npmjs.com/tls-test-1.0.0.tgz and show success message
Steps To Reproduce
-
In this environment
Termux 0.118.0
PWD=/root/node/tutorial
LS_OPTIONS=--color=auto HOME=/root
LANG=C.UTF-8 TERM=xterm-256color
DISPLAY=:1 SHLVL=1
XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/root/buildAPKs/bin/ _=/usr/bin/printenv OLDPWD=/root/node -
With this config...
-
Run 'npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz'
-
See error
npm ERR! code ENOTEMPTY
npm ERR! syscall rename npm ERR! path /usr/local/lib/node_modules/tls-test
npm ERR! dest /usr/local/lib/node_modules/.tls-test-ow7IxLcQ npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/tls-test' -> '/usr/local/lib/node_modules/.tls-test-ow7IxLcQ'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-11-08T16_36_52_883Z-debug-0.log
Environment
- npm: 8.19.3
- Node.js: 18.12.0
- OS Name: Debian GNU/Linux 10 (buster)
- System Model Name: Realme C25s
- npm config:
; "user" config from /root/.npmrc
registry = "http://registry.npmjs.org/" strict-ssl = false
; node bin location = /usr/local/bin/node
; node version = v18.12.0 ; npm local prefix = /root ; npm version = 8.19.3 ; cwd = /root/node/tutorial
; HOME = /root ; Run `npm config ls -l` to show all defaults.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file or test. Start by reproducing the global install command in the reported Termux/Debian environment and inspect /root/.npm/_logs/2022-11-08T16_36_52_883Z-debug-0.log. Done means the tls-test tarball installs successfully without ENOTEMPTY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100