如何在 ubuntu 上安装 forever-monitor

如何在 ubuntu 上安装 forever-monitor

我哪里出错了?。。在ubuntu下安装不了

我有两个设备:jetson nano 和桌面 ubuntu 18

我正在运行以下命令:

$npm i -g forever-monitor

当我尝试在两台设备上安装 forever-monitor 时,出现同样的错误

npm ERR! Linux 4.9.140-tegra 
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "forever-monitor" 
npm ERR! node v8.10.0 
npm ERR! npm v3.5.2 
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1 
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3) 
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22) 
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12) 
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7 
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12 
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5) 
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7) 
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20) 
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 
npm ERR! typeerror This is an error with npm itself. Please report this error at: 
npm ERR! typeerror http://github.com/npm/npm/issues 
npm ERR! Linux 4.9.140-tegra 
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "forever-monitor" 
npm ERR! node v8.10.0 
npm ERR! npm v3.5.2 
npm ERR! code EMISSINGARG 
npm ERR! typeerror Error: Missing required argument #1 
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3) 
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22) 
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12) 
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7 
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12 
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5) 
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7) 
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20) 
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50 
npm ERR! typeerror This is an error with npm itself. Please report this error at: 
npm ERR! typeerror http://github.com/npm/npm/issues 
npm ERR! Please include the following file with any support request:
npm ERR! /home/bmg/bmg/bmg_deepstream/npm-debug.log

答案1

  • 检查你的npm版本。如果你看到以下内容:

    $ npm -v
    3.5.2
    

    然后升级你的 npm:

    $ sudo npm install -g npm
    
  • 清除 bash 缓存,这样 bash 将从/usr/local/bin/文件夹中使用 npm:

    $ hash -d npm
    
  • sudo npm -i -g forever-monitor

结果:

    + [email protected]
    added 204 packages from 136 contributors in 10.082s

参考

相关内容