-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error: This must be called within a setup function #6799
Comments
Getting the same problem. I find 5 files where the date() is being called inside of a page that is using COMPOSITION API. That would be the source of the problem. |
Same for me. After bootstrapping a new project the page is not rendering but throwing an error 'Error: This must be called within a setup function' |
What integration do you use? |
shopify |
and what version of |
@WojtekTheWebDev I am also getting this error. I am using the default versions which are installed with vuestorefront/shopify. nuxtjs/composition-api v0.29.3 and the vue v2.6.12 |
@tpccdaniel I saw this error with new version of vue and composition api, verify if there are no other package that is upgrading your version of those packages in it's dependencies |
@WojtekTheWebDev Thank you. Can I clarify, you mean I should look through the packages included in the package.json of the VSF installation and ensure that these packages' dependencies are not using a higher version of Vue or composition API? I did actually scan through the package-lock.json and found that there are multiple versions of the nuxt/composition-api as dependencies of other packages. Is this an issue with the installation templates or is it only occurring on certain machines? Thanks 🙏 |
Hi, I have exactly same problem when trying to deploy app with prestashop integration. All my nuxtjs/composition-api versions are v0.29.3 too. Any update on this pls ? Many thanks |
This is an issue mainly because the 2.7.* version of vue is built using a newer babel version, which then modifies how Nuxt loads vue templates. Nuxt is unable to load any vue components that have a vue-storefront dependency because those were built with babel 7 and its trying to use babel 8 to load. Looking for an answer @Fifciu @bartoszherba please help |
In "general issues" I have just submitted an issue saying exactly this: So I think there are two issues:
|
For what it's worth this project with a combination of Yarn, Node >= 16 has worked for me => https://github.com/vuestorefront/template-shopify |
Hey @connyg thanks for your feedback. The truth is, we pushed a bit into quantity vs quality with the external integrations and we're fixing it now. Watch the February Live Stream to learn more! Also, can you dm me on Discord? I would love to have a chat with you about your experiences with VSF. We are doing quite big changes reg. DX this year and all feedback is priceless. Cheers! |
Generally, almost always when |
When I scaffold a new project with @vue-storefront/cli, it works. The moment I try to pick some other dependencies, I get this error quickly. Reverting the yarn.lock changes, removing node_modules, doing a fresh The dependency tree seems very 'fragile' in storefront :). |
Yes, exactly, very fragile. Exact the same experience here. Once I start to add something things break with high likelihood and the search begins. |
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
Able to fix / change the documentation?
Code of Conduct
The text was updated successfully, but these errors were encountered: