已解决elasticsearch-head启动失败,报Failed at the elasticsearch-head@0.0.0 start script.

2022-07-11 15:48:34 浏览数 (1)

一、前言

我们在学习ES时,安装可视化的界面,elasticsearch-head启动时报错。我们只需要按照报错的提示一步步进行设置安装环境就好了,下面跟着小编一起解决吧!!

二、报错展示

代码语言:javascript复制
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! elasticsearch-head@0.0.0 start: `grunt server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the elasticsearch-head@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersAdministratorAppDataRoamingnpm-cache_logs2022-01-10T02_51_13_341Z-debug.log

三、解决

报错信息提示说没有grunt环境,我们安装一下即可

1. 安装grunt

代码语言:javascript复制
npm install grunt --save-dev

2. 重新启动

代码语言:javascript复制
npm run start

3. 继续依次安装所需要的依赖

代码语言:javascript复制
 npm install grunt-contrib-clean
 npm install grunt-contrib-concat
 npm install grunt-contrib-watch
 npm install grunt-contrib-connect
 npm install grunt-contrib-copy
 npm install grunt-contrib-jasmine

4. 重新启动

代码语言:javascript复制
npm run start

5. 启动成功

代码语言:javascript复制
localhost:9100

Q.E.D.

0 人点赞