關於啓動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

啓動成功!

 

 

         

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