vue-storefront: [Bug]: Error: This must be called within a setup function

Describe the Bug

I get the error: Error: This must be called within a setup function While following the install instructions as per the document: npx @vue-storefront/cli generate store

Please help, I’m not sure what the cause is.

Current behavior

In visiting localhost:3001 Error: This must be called within a setup function

Expected behavior

The page renders

Steps to reproduce

bootstrap a new project using the cli then run npm un dev and visit the homepage

What version of Vue Storefront are you using?

2.5.6

What version of Node.js are you using?

16.16.0

What browser (and version) are you using?

Chrome

What operating system (and version) are you using?

macOS@latest

Relevant log output

ERROR  [Vue warn]: Error in setup: "Error: This must be called within a setup function."                                                                          00:06:15

found in

---> <DefaultLayout> at layouts/default.vue
       <Root>

Able to fix / change the documentation?

  • Yes
  • No

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

Generally, almost always when Error: This must be called within a setup function. occurred - it meant we have 2+ versions of nuxt-composition-api in our project. In order to fix that, we have to make sure only one version is installed in the whole project.