es 安装head插件的问题

/usr/local/node-v9.9.0/bin/npm install 执行该命令


npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ECONNREFUSED: request to https://registry.npmjs.org/grunt-contrib-copy failed, reason: connect ECONNREFUSED 151.101.228.162:443
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
以上是安装head插件的报错。 node 版本 

v9.9.0


采用网上的解决办法
/usr/local/node-v9.9.0/bin/npm install -g cnpm --registry=https://registry.npm.taobao.org

/usr/local/node-v9.9.0/bin/npm start 还是报错

> [email protected] start /usr/local/elasticsearch-head-master
> grunt server


sh: grunt: 未找到命令
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `grunt server`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?


npm ERR! A complete log of this run can be found in:

npm ERR!     /root/.npm/_logs/2018-04-21T08_42_24_584Z-debug.log



/usr/local/node-v9.9.0/bin/npm install -g grunt-cli 
执行安装

npm run start 还是报错

扫描二维码关注公众号,回复: 1881495 查看本文章
/usr/local/node-v9.9.0/bin/npm config set registry https://registry.npm.taobao.org 设置淘宝的  pacakge mirror

/usr/local/node-v9.9.0/bin/npm install

此时再执行/usr/local/node-v9.9.0/bin/npm run start
一切ok

参考地址:https://www.cnblogs.com/kidsitcn/p/4557548.html

猜你喜欢

转载自blog.csdn.net/u010320371/article/details/80031011