npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/yarn
npm ERR! dest /usr/local/lib/node_modules/.yarn-Jrexx8nI
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/yarn' -> '/usr/local/lib/node_modules/.yarn-Jrexx8nI'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-09-13T06_31_37_008Z-debug-0.log
Related
When I run npm run dev I get this huge error message:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/pavel/Documents/Web Projects/twitter-clone/node_modules/#babel/parser
npm ERR! dest /home/pavel/Documents/Web Projects/twitter-clone/node_modules/#babel/.parser-IknzzFET
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/pavel/Documents/Web Projects/twitter-clone/node_modules/#babel/parser' -> '/home/pavel/Documents/Web Projects/twitter-clone/node_modules/#babel/.parser-IknzzFET'
enter image description here
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ npm install --legacy-peer-deps
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/protons/Desktop/NH_Facility_Portal_V0/node_modules/npm
npm ERR! dest /home/protons/Desktop/NH_Facility_Portal_V0/node_modules/.npm-IgU3U5Pl
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/protons/Desktop/NH_Facility_Portal_V0/node_modules/npm' -> '/home/protons/Desktop/NH_Facility_Portal_V0/node_modules/.npm-IgU3U5Pl'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/protons/.npm/_logs/2022-07-04T03_19_39_491Z-debug-0.log
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install --legacy-peer-deps
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/protons/Desktop/NH_Facility_Portal_V0/node_modules/npm
npm ERR! dest /home/protons/Desktop/NH_Facility_Portal_V0/node_modules/.npm-IgU3U5Pl
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/protons/Desktop/NH_Facility_Portal_V0/node_modules/npm' -> '/home/protons/Desktop/NH_Facility_Portal_V0/node_modules/.npm-IgU3U5Pl'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-07-04T03_20_01_694Z-debug-0.log
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ ^C
protons#protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$
Try deleting the node_modules folder using rm -r node_modules and do npm install
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/akash2/.npm-packages/lib/node_modules/.staging/grpc-b403b8a1/node_modules/mkdirp
npm ERR! dest /home/akash2/.npm-packages/lib/node_modules/.staging/mkdirp-13f83417
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/home/akash2/.npm"
npm ERR! A complete log of this run can be found in:
npm ERR! /home/akash2/.npm/_logs/2021-05-07T05_37_52_411Z-debug.log
These are the errors. I am trying to fix this, but can't.
sh: 1: to: not found
npm ERR! Linux 4.13.0-32-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! contact#1.0.0 start: `command to run here`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the contact#1.0.0 start script 'command to run here'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the contact package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! command to run here
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs contact
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls contact
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/manukumar/project/Nfriendship/Contact/npm-debug.log
I have a vagrant VM with Ubuntu 14 64bit. My host is Windows 8.1. I'm trying to make an npm install on a shared folder (a nodejs app) but even with a
npm install --no-bin-links
it fails with
npm ERR! tar.unpack untar error /root/.npm/node-pre-gyp/0.6.8/package.tgz
npm ERR! tar.unpack untar error /root/.npm/node-pre-gyp/0.6.8/package.tgz
npm ERR! tar.unpack untar error /root/.npm/lodash-node/2.4.1/package.tgz
npm ERR! Linux 3.2.0-23-generic
npm ERR! argv "/usr/local/node/node-v0.12.7/bin/node" "/usr/local/node/node-default/bin/npm" "install" "--no-bin-links"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /vagrant_data/fe/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_
modules/brace-expansion/node_modules/concat-map/package.json.1e22b31c2e50debaced0adc67bb0250c
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! Error: EPERM, open '/vagrant_data/fe/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/
minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json.1e22b31c2e50debaced0adc67bb0250c'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM, open '/vagrant_data/fe/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modu
les/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json.1e22b31c2e50debaced0adc67bb0250c']
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! path: '/vagrant_data/fe/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/minimatch/n
ode_modules/brace-expansion/node_modules/concat-map/package.json.1e22b31c2e50debaced0adc67bb0250c' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 3.2.0-23-generic
npm ERR! argv "/usr/local/node/node-v0.12.7/bin/node" "/usr/local/node/node-default/bin/npm" "install" "--no-bin-links"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path npm-debug.log.2e07d69aba2393c854d2992b7057b4c0
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! ETXTBSY, rename 'npm-debug.log.2e07d69aba2393c854d2992b7057b4c0'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /vagrant_data/fe/npm-debug.log
and I really can't understand why. My npm version is 2.11.3.
Can you help me?
I'll answer my own question, maybe it will be useful to someone. It's a Vagrant bug, here's the fix:
Github link
EDIT
for those who need some detail: I'm running Vagrant 1.7.2 and VirtualBox 4.3.28.
What I did to solve my problem was to edit the file
# Lines 495-510 - C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.2\plugins\providers\virtualbox\driver\version_4_3.rb
def share_folders(folders)
folders.each do |folder|
args = ["--name",
folder[:name],
"--hostpath",
- folder[:hostpath]]
+ '\\\\?\\' + folder[:hostpath].gsub(/[\/\\]/,'\\')]
args << "--transient" if folder.key?(:transient) && folder[:transient]
# Enable symlinks on the shared folder
execute("setextradata", #uuid, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/#{folder[:name]}", "1")
# Add the shared folder
execute("sharedfolder", "add", #uuid, *args)
end
end
as shown in the Celtric comment (HERE the link).