当我尝试使用sudo npm安装MERN cli时,请安装-g mern-cli,但它向我显示以下错误
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>
我该如何解决这个问题
答案 0 :(得分:1)
mern-cli
的问题在某些机器上有效,最好使用mern-stack-cli
。
sudo npm install -g mern-stack-cli
即使您可以申请mean-cli