Closed hengkiardo closed 9 years ago
I had a similar error (while installing bower):
npm ERR! tar.unpack untar error /Users/jakegoulding/.npm/ctype/0.5.2/package.tgz
npm WARN optional dep failed, continuing http-signature@0.10.0
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "install" "bower" "-g"
npm ERR! cwd /Users/jakegoulding/Projects/bree
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.26/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
I was able to continue by removing the tarball manually:
rm /Users/jakegoulding/.npm/ctype/0.5.2/package.tgz
Does npm check the downloaded files consistency? My guess is that that download got borked in flight; verifying the download against a MD5 (or other hash of choice) would have caught this and forced a redownload.
npm cache clean
solved a similar "untar" error.
Thanks leoj3n "npm cache clean" solved the problem for me!
Actually i use npm cache clean solved a similar "untar" error. But display another problem .
$ npm cache clean npm ERR! Windows_NT 6.3.9600 npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "cache" "clean" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\Users\asusu\AppData\Roaming\npm-cache\ionic\1.3.11 npm ERR! code EBUSY npm ERR! errno -4082
npm ERR! EBUSY, unlink 'C:\Users\asusu\AppData\Roaming\npm-cache\ionic\1.3.11' npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! http://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request: npm ERR! D:\Program Files\phpStudy\WWW\ionic\npm-debug.log /c/Program Files/nodejs/npm: line 14: 2568 Signal 112 (core dumped ) "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@"
Try running your command prompt as administrator that worked for me..
Bump, encounter in my mac, use sudo solved this question.
FYI, I had to clear my bower cache as well as my npm cache to resolve this issue:
$ npm cache clean
$ bower cache clean
Add sudo that prompt administrator to work this
npm cache clean
didn't work for me. sudo did. Yosemite 10.10.3
It seems that npm cache clean doesn't work in Yosemite 10.10.3, except sudo.
Similar issues on Mac but adding sudo worked
Same issue with untar error on three different packages in ~.npm .
npm cache clean bower cache clean
did not fix.
Tried multiple times so don't think it's a borked download issue.
Even manually cd to the directory in question and untar the package.tgz myself and still have the same error.
Shouldn't npm detect that the package is already there and untared so no need to try to re-download and untar it?
I think in my case it may be an issue with shared folder, using linux vm on a windows host but would think manually untaring the tgz would be a work around
in my case I was trying to install nodemon. The error has been resolved by installing pkg global and not local
sudo npm install works for me.
updating npm and sudo worked for me
I am trying to install ionic on windows and im getting this error. Any solution??
please clear the %user%/Temp on Windows then run npm cache clean \ and try again
npm cache clean work for me... Thanks.
I tried npm cache clean but still getting the same error
got same error installing ws module. Solved opening cmd as an Administrator
"Restart" solved my problem! I am using Ubuntu in virtual box and shared a directory from my host OSX computer. I accidentally deleted the files in OSX and try to clone again the files via git. I have to do npm install
but I got the following error
npm ERR! tar.unpack untar error...
...
npm ERR! EEXIST: file already exists, mkdir '/home/vagrant/project-server/node_modules'
File exists: /home/vagrant/project-server/node_modules
Move it away, and try again.
I did npm cache clean
but I still can't make it work. I restarted the VM and npm install work. I guess Ubuntu is not aware that the project-server
directory is deleted that's why it's complaining. Maybe there's a better way to refresh the status of the files without restarting.
try with: sudo ...
Had the same issue. It was caused by incomplete .tar.gz files. But npm cache clean
didn't help me. Only after disabling my vpn I successfully installed deps. So in my case the issue was in network connection.
sudo npm install -g react-native-cli, then enter your password. This proplem would solved!
I'm on OSX El Capitan 10.11.2.
sudo npm install -g bower
works for me.
I am trying to install Ionic on Windows 7. Getting error for untar package.tgz.
npm ERR! tar.unpack untar error C:\Users\user1\AppData\Roaming\npm-cache\ionic\1.7.12\package.tgz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user1\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\n
pm-cli.js" "install" "-g" "ionic"
npm ERR! node v4.2.4
npm ERR! npm v3.5.3
npm ERR! path C:\Users\user1\AppData\Local\Temp\npm-7336-1b0c36d1\unpack-4a6c8f61\node_modules\ionic-app-lib\node_modul
es\archiver\node_modules\file-utils\node_modules\isbinaryfile\tests\fixtures\04_HelloWorld.pdf
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\user1\AppData\Local\Temp\npm-7336-1b0c36d1\unpack-4a6c8f
61\node_modules\ionic-app-lib\node_modules\archiver\node_modules\file-utils\node_modules\isbinaryfile\tests\fixtures\04_
HelloWorld.pdf'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, open 'C:\Users\user1\AppData\Local\Temp\npm-7336-1b0c36d1\unpack-4a
6c8f61\node_modules\ionic-app-lib\node_modules\archiver\node_modules\file-utils\node_modules\isbinaryfile\tests\fixtures
\04_HelloWorld.pdf']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\\Users\\user1\\AppData\\Local\\Temp\\npm-7336-1b0c36d1\\unpack-4a6c8f61\\node_modules\\ionic-app-l
ib\\node_modules\\archiver\\node_modules\\file-utils\\node_modules\\isbinaryfile\\tests\\fixtures\\04_HelloWorld.pdf' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\user1\npm-debug.log
Seems while untaring, the filepath is longer than acceptable by OS.
Any help please.
This could be a disk space issue. Try to clear your /tmp/
folder
@bluejamesbond it helps for me. thx
Following worked for me
npm cache clean
npm update
npm install
WARNING!, the sudo helps, and solve it, but i dont recommend it. Past days i have problems with that, because then the installation appears like root user by using sudo, and when you compile and other thins, the console show other type errrors because you are working with pacakges installed by SUDO(root) user.... then the best solution for not having problems in the future with updates and other libraries is change the chown user. In the next link i found more information: https://docs.npmjs.com/getting-started/fixing-npm-permissions
i have the same issue,any help?
I use sudo solved this question in my mac too.
I have solved by this way: just remove the $NVM_DIR and reinstall nvm.
I have the same issue, none of the solutions worked for me. The problem is using virtualbox share folder. By copy pasting file to another folder it will work. I'm waiting for the real solution :)
In my case this was caused by package.json
and npm-shrinkwrap.json
being "out of sync". So to fix things I needed to run npm shrinkwrap
, fix the reported conflicts and then npm install
.
npm cache and run as admin worked for me.
FOR MAC USER:
also for me, running the command with 'sudo' worked. So it become something like this:
sudo npm install
...whatever you need to install
Also, if you're on Virtualbox VM and have your project hosted on other partition (separate mounted *.vdi file), try moving it to the main system partition. Doing that has solved the issue for me :)
On my mac, running sudo npm cache clean
worked for me; didn't have to run npm install
with sudo.
just add “sudo” to the last one npm command order
A hexo newer
sudo npm install hexo-cli -g
ubuntu/xenial64
vagrant VM on Mac OSX host, having similar issue running npm install
:
https://gist.github.com/nadalsol/2378a02e3eeffac35708349e97c1e492
sudo
does not solve the issue.
BTW... this issue is open since 2014
...
I got the same errors because my VM ran out space have way through the npm install. Make sure you have enough space and run (npm cache clean). This worked for me.
Encountered this issue in elementary OS (modified ubuntu), switched to yarn package manager.
thanks @leoj3n npm cache clean
worked for me!
sudo npm install XX
works for me!
npm cache clean
not worked
macOS Sierra 10.12.2
node v5.12.0
npm 3.8.9
I tried all the aforesaid trick(npm cache clean(run as admin too) , npm update) , but dint work.. still getting the same error orginially posted. Any help will be appreciated.
I encountered this while trying to npm install
a tarball that I created myself using grunt-contrib-compress. For whatever reason, the output of grunt-contrib-compress isn't like by npm. It worked fine for me when I created the tarball with tar -cvzf
or npm pack
instead.
I just built the app on Windows instead of my Ubuntu VM and that worked. I can even npm start through my VM and develop that way.
i try npm install on Ubuntu 12.04, i getting error about
tar.unpack untar error
it seem related with mongoose/mongodbthis one screenshoot from my terminal
this one list of my node modules