npm ERR! Linux 5.4.0-122-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "cnpm" "--registry=https://registry.npm.taobao.org"
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>
WARN engine npminstall@6.5.1: wanted: {"node":">=14.0.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
npm ERR! Please include the following file with any support request:
npm ERR! /video/media/wvp-GB28181-pro/web_src/npm-debug.log
1.这种报错一般是安装node有问题
2, 下载并执行NodeSource安装脚本
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
3.启用NodeSource存储库后,安装Node.js和npm
sudo apt-get install -y nodejs
4.通过打印它们的版本来验证Node.js和npm是否已成功安装
node --version # v16.17.0
npm --version # v8.15.0
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/68fe94459e93e5b2315ee85c82b065c0.png)