简体   繁体   中英

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.

I've tried:

sudo npm install pm2 -g

and

npm cache clear -f

...followed by both sudo and non-sudo installation attempts. 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? I'm quite new to SSH/Linux servers etc so this is all probably very obvious... :/

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.

But it's now working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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