elasticsearch安装head插件问题

通过npm安装grunt和grunt server,按照网上文档在lasticsearch-head-master目录部署

npm install -g grunt

第一个问题是
执行完lasticsearch-head-master目录下一直没有node_modules目录产生。

ls
Dockerfile         elasticsearch-head.sublime-project  grunt_fileSets.js  LICENCE       plugin-descriptor.properties  README.textile  src
Dockerfile-alpine  Gruntfile.js                        index.html         package.json  proxy                         _site           test

解决:

npm install grunt --save-dev

就在当前目录创建了node_modules

第二个问题是
执行grunt server有如下提示
Local Npm module “grunt-contrib-clean” not found. Is it installed?
Local Npm module “grunt-contrib-concat” not found. Is it installed?
Local Npm module “grunt-contrib-watch” not found. Is it installed?
Local Npm module “grunt-contrib-connect” not found. Is it installed?
Local Npm module “grunt-contrib-copy” not found. Is it installed?
Local Npm module “grunt-contrib-jasmine” not found. Is it installed?
Warning: Task “connect:server” not found. Use --force to continue.
Aborted due to warnings.

解决方法:

npm install grunt-contrib-clean grunt-contrib-concat grunt-contrib-watch grunt-contrib-connect grunt-contrib-copy grunt-contrib-jasmine

以上两个问题也有可能是我的安装方式不对导致的。通过这样操作最终把问题解决了。

你可能感兴趣的:(elasticsearch)