首页 > 解决方案 > 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'

我删除了 yarn.lock 文件以及 node_modules 目录,重复该过程,安装成功。我只是想提一下,以防万一。

标签: internal-server-errorvue-storefront

解决方案


推荐阅读