简体   繁体   English

安装pm2时出错

[英]Error in installing pm2

I want to install pm2 on my rasspberry pi 3: 我想在我的rasspberry pi 3上安装pm2:

npm install -g pm2

but i get this error: 但我得到这个错误:

(node:5118) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use 
os.tmpdir() instead.
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
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 Linux 4.9.59-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "pm2"
npm ERR! cwd /home/pi/JSMTProxy
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/JSMTProxy/npm-debug.log
npm ERR! not ok code 0

I try to add sudo before the command but nothing change. 我尝试在命令之前添加sudo但没有任何改变。

You need to update npm . 你需要更新npm

Use the following command and try again: 使用以下命令,然后重试:

npm install -g npm@latest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM