关于启动ElasticSearch-head-master启动失败的问题处理:Fatal error: Unable to find local grunt

启动ElasticSearch-head-master启动失败的问题处理

        今天在学习使用Elastic Search的过程中,需要使用到了一个插件ElasticSearch-head-master的工具来管理和监听Elastic Search的健康状态和相关的索引情况。

        于是我安装好了Es、安装好了node.js,下载好了ElasticSearch-head-master,但是在启动ElasticSearch-head-master的时候出现了如下问题:

        1.进入到ElasticSearch-head-master的安装文件:

         cd  D:\download\elasticsearch-head-master(每个人的路径不同)

        2.执行启动命令:

        grunt server / npm run start

在此步骤出现了error:

D:\download\elasticsearch-head-master>npm run start

> [email protected] start D:\download\elasticsearch-head-master
> grunt server

grunt-cli: The grunt command line interface (v1.3.2)

Fatal error: Unable to find local grunt.

If you're seeing this message, grunt hasn't been installed locally to
your project. For more information about installing and configuring grunt,
please see the Getting Started guide:

https://gruntjs.com/getting-started
npm ERR! code ELIFECYCLE
npm ERR! errno 99
npm ERR! [email protected] start: `grunt server`
npm ERR! Exit status 99
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!     C:\Users\研发部002\AppData\Roaming\npm-cache\_logs\2019-12-23T05_51_06_467Z-debug.log

 

标红错误信息提示有部分必须的东西没有安装上,于是继续安装

首先查看还学要安装那些东西:npm install grunt --save-dev

npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] license should be a valid SPDX license expression

+ [email protected]
added 94 packages from 65 contributors and audited 162 packages in 30.176s

1 package is looking for funding
  run `npm fund` for details

found 9 vulnerabilities (2 low, 2 moderate, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details

D:\download\elasticsearch-head-master>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.

上述提示未安装的grunt-contrib下面的很多未安装的包,安装好了之后即可正常使用

安装完成之后重新执行:grunt server

D:\>cd D:\download\elasticsearch-head-master

D:\download\elasticsearch-head-master>grunt server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100

启动成功!

 

 

         

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章