internal-server-error - vue店面主页上的内部服务器错误
问题描述
初始加载期间主页出现内部服务器错误。vue-storefront.log 中的错误日志报告如下:
[search] Can not connect the vue-storefront-api / ElasticSearch instance! Error: {"code":500,"result":{"diagnosticText":"src/processor/default.ts(25,48): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'string | Query | (string | Query)[] | ((searchString: string, position?: number) => number) | ((searchElement: string | Query, fromIndex?: number) => number)' has no compatible call signatures.\n","diagnosticCodes":[2349]}}
at SearchAdapter.exports.modules../core/lib/search/adapter/api/searchAdapter.ts.SearchAdapter.handleResult (vsf-search-adapter-0.server-bundle.js:519:23)
之前似乎已经报告了一个类似的错误:https ://github.com/DivanteLtd/vue-storefront/issues/3259 其他人是否遇到过类似的问题并有解决方案?
在安装 vue 店面时,我在 vue-storefront.log 中得到了这个错误日志(我选择不使用 demo.vuestorefront.io 作为后端):
ERROR in ./src/themes/default/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@babel/compat-data/corejs3-shipped-proposals'
- 操作系统:Mac OS Mojave 10.14.6
- 节点:v 14.1.0
- 纱线:v 1.22.4
我删除了 yarn.lock 文件以及 node_modules 目录,重复该过程,安装成功。我只是想提一下,以防万一。
解决方案
推荐阅读
- swift - ARC 是否对无主引用进行计数?
- docker - Puppeteer 在 docker 容器中失败:“浏览器已断开连接!”
- mongodb - MochaTest 错误 - UnhandledPromiseRejectionWarning: TypeError: done is not a function
- bash - 使用 curl 下载证书,将证书值回显到 openssl
- ios - Hashable == 方法不能快速检测两个对象之间的差异
- python - 为什么 3D numpy 数组按原样打印(它们是如何排序的)?
- python - VBA To Pandas - 将 VBA 逻辑与 Pandas 匹配时遇到问题
- groovy - 检查存在多少个正则表达式匹配组,然后使用它们
- c++ - reinterpret_cast 如何用于展平 std::vector?
- docker - 使用 Gitlab CI/CD 配置 Docker?