Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.
This repository was archived by the owner on May 28, 2023. It is now read-only.

VSF ui is keeps displaying error page #444

@evokay-ops

Description

@evokay-ops

Current behavior

I have not been able to get vsf ui to display properly. I consistently get the error page something went wrong.

I've tried all kinds of things and spent hours but to no avail. I keep getting the following 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 | ParsedQs | string[] | ParsedQs[] | ((searchString: string, position?: number) => number) | ((searchElement: string, fromIndex?: number) => number) | ((searchElement: ParsedQs, fromIndex?: number) => number)' has no compatible call signatures. ",
diagnosticCodes: [
2349
]
}
}

I've tried just using npm install, I've tried just using yarn install. I've tried running vsf ui without docker, I've tried running it with docker.

I followed all the instructions on this issue: vuestorefront/vue-storefront#4275

I've tried restricting Typescript to 3.4.1 in both vsf ui and vsf-api.

I've discarded both projects and cloned the afresh but all these attempts have yielded nothing.

What's weird is the vsf-api seems to be fine because the endpoint here returns data: http://localhost:8080/api/catalog/vue_storefront_catalog/product/_search?q=bag&size=50&from=0

The endpoint that the chrome network shows as erroring out is below:
When I try hitting this endpoint below, that's when I get the error in question about "Cannot invoke an expression whose type lacks a call signature":

http://localhost:8080/api/catalog/vue_storefront_catalog/attribute/_search?_source_include=activity%2Cattribute_code%2Cattribute_id%2Cdefault_frontend_label%2Cdefault_value%2Centity_type_id%2Cfrontend_input%2Cfrontend_label%2Cid%2Cis_user_defined%2Cis_visible_on_front%2Cis_visible%2Cis_comparable%2Coptions%2Ctier_prices&from=0&request=%7B%22query%22%3A%7B%22bool%22%3A%7B%22filter%22%3A%7B%22terms%22%3A%7B%22attribute_code%22%3A%5B%22color%22%2C%22erin_recommends%22%2C%22price%22%2C%22size%22%2C%22activity%22%2C%22final_price%22%2C%22id%22%2C%22image%22%2C%22name%22%2C%22new%22%2C%22original_price%22%2C%22original_price_incl_tax%22%2C%22price_incl_tax%22%2C%22product_links%22%2C%22sale%22%2C%22sku%22%2C%22special_price%22%2C%22special_price_incl_tax%22%2C%22special_from_date%22%2C%22special_to_date%22%2C%22status%22%2C%22tax_class_id%22%2C%22tier_prices%22%2C%22type_id%22%2C%22url_path%22%2C%22url_key%22%5D%7D%7D%7D%7D%7D&size=150&sort=

I've exausted all my options as I've downloaded the vsf projects ultiple times and I keep getting the same error.

Here's my Typescript version: 3.4.1 (I also tried latest versiona and also tried 3.1.4)
@types/express version is 4.17.0
@types/express-serve-static-core: 4.16.7

Expected behavior

With both vsf-ui and vsf-api started,
When I hit localhost:3000, I should get the page with some products in it but I only get the error page telling me that something went wrong.

Steps to reproduce the issue

Setup both vsf-ui and vsf-api from current live stable repos and go visit the vsf-ui homepage

Repository

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.

  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.

  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Chrome, Version 81.0.4044.138 (Official Build) (64-bit)
  • OS: mackOS Mojave, Version 10.14
  • Node: v12.16.3
  • Code Version: master

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions