mern-cli icon indicating copy to clipboard operation
mern-cli copied to clipboard

npm install -g mern cli -> can't install

Open quarkcharmer opened this issue 5 years ago • 3 comments

(Mac OS X 10.13.6) prefix with sudo, install hangs with

Unhandled rejection Error: Command failed: /usr/bin/git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /Users/jon/.npm/_cacache/tmp/git-clone-bc41fa44 /Users/jon/.npm/_cacache/tmp/git-clone-bc41fa44/.git: Permission denied

at ChildProcess.exithandler (child_process.js:291:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:595:12)

Can't understand the "Permission denied" as path to .../tmp exists and is owned by me ?

quarkcharmer avatar Sep 26 '18 20:09 quarkcharmer

I ran sudo npm install -g mern-cli three times. It installed mern-cli but missing next-tick. Then I ran sudo npm install -g next-tick to add next-tick. So far it is working.

wandonye avatar Oct 15 '18 03:10 wandonye

I've upgraded the version of npm to 6.x.x by:

sudo npm i -g npm

Firstly, we install next-tick as @wandonye said, and after that, we install mern-cli

sudo npm i -g next-tick
sudo npm i -g mern-cli

huynhsamha avatar Feb 26 '19 06:02 huynhsamha

I have a similar problem with Manjaro Linux:

npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b 0.0.2 git://github.com/timoxley/next-tick.git /root/.npm/_cacache/tmp/git-clone-5ccb0b38
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-5ccb0b38': Permission denied
npm ERR! 

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

2019-03-07T15_19_05_044Z-debug.log

nodejs --version v11.10.0

npm --version 6.9.0

I've upgraded the version of npm to 6.x.x by:

sudo npm i -g npm

Firstly, we install next-tick as @wandonye said, and after that, we install mern-cli

sudo npm i -g next-tick
sudo npm i -g mern-cli

I tried this and it did not work

brendonhc avatar Mar 07 '19 15:03 brendonhc