简体   繁体   English

NPM安装PM2 -g(Ubuntu 14.04 x64)期间出错

[英]Error during NPM install PM2 -g (Ubuntu 14.04 x64)

I am getting an error whilst trying to run npm install pm2 -g on a cloud Ubuntu 14.04 microserver/droplet. 尝试在云Ubuntu 14.04 microserver / droplet上运行npm install pm2 -g时出现错误。

I've tried: 我试过了:

sudo npm install pm2 -g

and

npm cache clear -f

...followed by both sudo and non-sudo installation attempts. ...之后是sudo和非sudo安装尝试。 All result in the below. 所有结果如下。

Verbatim outcome: 逐字结果:

npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror http://ikt.pm2.io/ikt.git /root/.npm/_git-remotes/http-ikt-pm2-io-ikt-git-4d23bf0d: undefined
npm ERR! git clone --template=/root/.npm/_git-remotes/_templates --mirror http://ikt.pm2.io/ikt.git /root/.npm/_git-remotes/http-ikt-pm2-io-ikt-git-4d23bf0d: undefined
npm WARN optional dep failed, continuing ikt@git+http://ikt.pm2.io/ikt.git#master
npm WARN optional dep failed, continuing fsevents@0.3.8
/usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
/usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
pm2@0.15.6 /usr/local/lib/node_modules/pm2
├── async@1.4.2
├── eventemitter2@0.4.14
├── isbinaryfile@2.0.4
├── semver@5.0.3
├── pidusage@0.1.1
├── safe-clone-deep@1.0.5
├── debug@2.2.0 (ms@0.7.1)
├── coffee-script@1.9.3
├── pm2-deploy@0.2.1 (tv4@1.0.18)
├── shelljs@0.5.3
├── commander@2.8.1 (graceful-readlink@1.0.1)
├── vizion@0.2.11 (async@0.9.0)
├── chalk@1.1.1 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.0)
├── cli-table@0.3.1 (colors@1.0.3)
├── pm2-multimeter@0.1.2 (charm@0.1.2)
├── pm2-axon-rpc@0.3.6 (json-stringify-safe@5.0.1, commander@1.0.5)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── nssocket@0.5.3 (lazy@1.0.11)
├── pm2-axon@2.0.8 (amp-message@0.1.2, escape-regexp@0.0.1, amp@0.3.1, configurable@0.0.1, debug@2.0.0)
├── cron@1.0.9 (moment-timezone@0.3.1)
├── blessed@0.1.61
├── pmx@0.5.3 (json-stringify-safe@5.0.1)
├── chokidar@1.0.6 (arrify@1.0.0, is-glob@1.1.3, path-is-absolute@1.0.0, async-each@0.1.6, is-binary-path@1.0.1, glob-parent@1.3.0, readdirp@1.4.0, anymatch@1.3.0)
└── moment@2.10.6
root@xxxx:~#

Is the Git repo b0rked? Git回购了吗? I'm quite new to SSH/Linux servers etc so this is all probably very obvious... :/ 我是SSH / Linux服务器等的新手,所以这可能非常明显...:/

Figured it out: turned out it had installed ok. 想通了:原来它已经安装好了。

The above was misleading as it a) looked as though it'd not completed properly, and b) trying to run any PM2-based command immediately afterwards was resulting in an error. 上面的内容具有误导性,因为它a)看起来好像没有正确完成,并且b)之后尝试立即运行任何基于PM2的命令都导致错误。

But it's now working. 但是现在正在工作。

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

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