node.jsreactjsnpmmern

Not able to install MERN stack


When i trying to install MERN cli using sudo npm install -g mern-cli but it's showing me below error

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

    at ChildProcess.exithandler (child_process.js:288:12)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:599:12)

npm ERR! cb() never called!

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

How can I slove this issue


Solution

  • Its the problem with mern-cli it works in some machines, better you go for mern-stack-cli.

    sudo npm install -g mern-stack-cli
    

    even you can go for mean-cli