axetroy/sms-boom

node和npm版本不对

Closed this issue · 3 comments

系统

[root@vultr ~]# cat /etc/redhat-release
CentOS release 6.9 (Final)

我执行以下命令来安装nodejs 和 npm

yum info epel-release
sudo yum install epel-release
sudo yum install nodejs
sudo yum install npm

安装好的版本信息

[root@vultr ~]# node -v
v0.10.48
[root@vultr ~]# npm -v
1.3.6

我在执行PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install smsboomer -g遇到错误

npm http GET https://registry.npmjs.org/smsboomer
npm http 200 https://registry.npmjs.org/smsboomer
npm http GET https://registry.npmjs.org/smsboomer/-/smsboomer-1.4.0.tgz
npm http 200 https://registry.npmjs.org/smsboomer/-/smsboomer-1.4.0.tgz
npm http GET https://registry.npmjs.org/axios
npm http GET https://registry.npmjs.org/caporal
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/fs-extra
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/p-retry
npm http GET https://registry.npmjs.org/p-timeout
npm http GET https://registry.npmjs.org/progress
npm http GET https://registry.npmjs.org/puppeteer
npm http GET https://registry.npmjs.org/axetroy/context
npm http GET https://registry.npmjs.org/axetroy/graceful
npm http 304 https://registry.npmjs.org/fs-extra
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/progress
npm http 304 https://registry.npmjs.org/axios
npm http 304 https://registry.npmjs.org/caporal
npm http 304 https://registry.npmjs.org/p-timeout
npm http 304 https://registry.npmjs.org/p-retry
npm http 304 https://registry.npmjs.org/puppeteer
npm http 404 https://registry.npmjs.org/axetroy/context
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR!     at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
npm ERR!     at /usr/lib/node_modules/npm/lib/cache.js:675:5
npm ERR!     at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR!     at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "smsboomer" "-g"
npm ERR! cwd /root
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! type non_object_property_load
npm http 404 https://registry.npmjs.org/axetroy/graceful
npm ERR! TypeError: Cannot read property 'latest' of undefined
npm ERR!     at next (/usr/lib/node_modules/npm/lib/cache.js:687:35)
npm ERR!     at /usr/lib/node_modules/npm/lib/cache.js:675:5
npm ERR!     at saved (/usr/lib/node_modules/npm-registry-client/lib/get.js:148:7)
npm ERR!     at /usr/lib/node_modules/graceful-fs/polyfills.js:133:7
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32-696.10.2.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "smsboomer" "-g"
npm ERR! cwd /root
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR! type non_object_property_load
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

是我配置的不对吗?

Thanks for opening your first issue here! Be sure to follow the issue template!

请升级你的node版本和npm版本

建议使用版本管理工具安装nodejs,使用nvm安装。

安装最新版的LTS版本