Elasticsearch:Failed at the phan
2021-01-23 本文已影响0人
心淡然如水
问题一:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install 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 install phantomjs-prebuilt@2.1.16 --ignore-scripts命令用来安装phantomjs-prebuilt@2.1.16,–ignore-scripts参数用于npm install在安装phantomjs-prebuilt@2.1.16时忽略package.json中设置的脚本,意思就是避免package.json中的脚本影响包的正常安装。
问题二:
解决网站访问跨域问题
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
#添加跨域请求
http.cors.enabled: true
http.cors.allow-origin: "*"