ES组件elasticsearch-head报错 npm ERR! Please include the following file with any support request

1、报错信息:

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/elasticsearch-6.2.3/elasticsearch-head/npm-debug.log

第一次安装组件报错信息
在这里插入图片描述
第二次安装组件报错信息
在这里插入图片描述
在这里插入图片描述
报错原因:没有生成/usr/local/elasticsearch-6.2.3/elasticsearch-head/npm-debug.log日志文件。
解决办法 :

  1. 先清除掉以前的代理设置
npm config set proxy null
npm config set https-proxy null

也可以先通过以下代码查看代理设置,如果返回null那就不需要清理。

npm config get proxy
npm config get https-proxy

2、重新设置

npm config set registry http://registry.cnpmjs.org/

在这里插入图片描述

分别执行一下node -v 和 npm -v 如果没出来版本号 就是环境没弄好

在这里插入图片描述

2、报错原因:80端口被占用

在这里插入图片描述
解决办法 :

查看80端口占用的进程
# fuser -n tcp 80
#杀掉进程
ps -ef|grep nginx|awk -F ' ' '{print $2}'|xargs kill -9     ---->nginx

kill -9 `pgrep nginx`    ----->nginx

#查看80端口是否被占用,如果还有执行上两步。
nestat -lantp  | grep 80  

切换到elasticsearch用户下执行

/usr/local/elasticsearch-6.2.3/elasticsearch-head# npm install

3、没有权限

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
解决办法:
创建模块

#mkdir /usr/local/lib/mode_modules
#mkdir /usr/local/lib/node_modules/.staging
elasticsearch@ubuntu:/usr/local/elasticsearch-6.2.3/elasticsearch-head$ npm config set proxy null
elasticsearch@ubuntu:/usr/local/elasticsearch-6.2.3/elasticsearch-head$ npm config set https-proxy null
elasticsearch@ubuntu:/usr/local/elasticsearch-6.2.3/elasticsearch-head$ npm config set registry http://registry.cnpmjs.org/
elasticsearch@ubuntu:/usr/local/elasticsearch-6.2.3/elasticsearch-head$ npm install

4、npm安装报错:

在这里插入图片描述
报错原因 : spdx license是一个开源软件或者其他合作类软件的一个使用声明,不影响使用
https://www.cnblogs.com/koudaiyoutang/p/11840457.html

解决办法 :

$ npm install --no-optional

扩展

1、报错如下 :
在这里插入图片描述

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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:\Users\admin\AppData\Roaming\npm-cache\_logs\2018-11-09T07_28_28_466Z-debug.log

解决:卸载已安装的新版本webpack,装老版本就好。如果没有安装webpack,跳过第一条命令安装一下就好了。

(1)依次输入以下命令

npm uninstall webpack-dev-server

(2)安装2.9.1的webpack

npm install [email protected]

(3)运行项目

npm run dev

参考连接:
使用npm安装出现err的解决方案(npm国内镜像) : https://blog.csdn.net/r1254/article/details/78350282
npm install过程失败的几种处理方法 :https://blog.csdn.net/weixin_43487252/article/details/90380587
npm install 报错(npm ERR! errno 1) : https://blog.csdn.net/wanlixingzhe/article/details/81020276

Vue搭建环境时npm run dev,npm ERR! code ELIFECYCLE :

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node build/dev-server.js
https://blog.csdn.net/qq_37288477/article/details/80531864
https://stackoverflow.com/questions/20397883/npm-doesnt-install-any-modules-network-socket-hangs-up

npm err安装报错解决办法 :https://blog.csdn.net/weixin_42711399/article/details/84350368

npm使用过程中的一些错误解决办法及npm常用命令 :https://blog.csdn.net/zhanglir333/article/details/78616284

(centos) Elasticsearch中Head插件的使用 : https://www.cnblogs.com/aubin/p/8018081.html

发布了314 篇原创文章 · 获赞 57 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/qq_40907977/article/details/104308768