SumNeuron
SumNeuron

Reputation: 5198

npm install unhandled rejection

I'm trying to figure out why npm install no longer works on a Ubuntu 14 LTS machine.

The project is a nuxt project, and npm install works on a Unix machine.

I have tried uninstalling and reinstall both node and npm.

Current versions are:

If I run npm install --verbose

we get

Unhandled rejection Error: Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/dcodeIO/long.js.git /home/<USER>/.npm/_cacache/tmp/git-clone-226d28b2
/home/<USER>/.npm/_cacache/tmp/git-clone-226d28b2/.git: Permission denied

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:189:13)
    at Pipe._handle.close (net.js:600:12)

npm timing npm Completed in 128572ms
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/<USER>/.npm/_logs/2019-02-21T15_22_07_078Z-debug.log

the last few lines of that file are:

17822 silly extract [email protected] extracted to /home/<USER>/<PROJECT>/node_modules/.staging/core-js-49a396dc (950ms)
17823 silly extract [email protected] extracted to /home/<USER>/<PROJECT>/node_modules/.staging/vuetify-c586b9e6 (4197ms)
17824 timing npm Completed in 128572ms
17825 error cb() never called!
17826 error This is an error with npm itself. Please report this error at:
17827 error <https://npm.community>

Upvotes: 0

Views: 913

Answers (1)

Hemant
Hemant

Reputation: 170

try to install node by nvm (node version manager).

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash

just try these simple step's (hope its work in your case):

  • copy and paste this command in the terminal after completing this.
  • close and re-open the terminal
  • type nvm to check is nvm installed on your system.
  • type by checking nvm ls (this show you a default node installed version).
  • then go to your project directory and use npm install or npm i

Upvotes: 1

Related Questions