vuestorefront / shopware-pwa

Shopware PWA for eCommerce. Headless storefront solution for Shopware 6, which communicates through the SalesChannel-API. Always Open Source, MIT license. Made with :blue_heart: by shopware AG & Vue Storefront.
https://frontends.shopware.com
MIT License
345 stars 103 forks source link

[BUG] Followed Getting Started -> [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function. #1405

Closed xdrago1 closed 3 years ago

xdrago1 commented 3 years ago

Describe the bug

I followed the getting-started guide for shopware-pwa and used all the default settings for init. However I cannot it to run properly as expected. After running yarn-dev or shopware-pwa dev and the building is complete, I get the error on localhost:3000: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.

Additional context

.shopware-pwa/source/logic/checkout/useShippingStep.js:5:
Module../.shopware-pwa/source/logic/checkout/useShippingStep.js
webpack/bootstrap:25:
__webpack_require__
.shopware-pwa/source/logic/checkout/useUICheckoutPage.js:1:
Module../.shopware-pwa/source/logic/checkout/useUICheckoutPage.js
webpack/bootstrap:25:
__webpack_require__
.shopware-pwa/source/logic/checkout/index.js:1:
Module../.shopware-pwa/source/logic/checkout/index.js
webpack/bootstrap:25:
__webpack_require__
.shopware-pwa/source/logic/checkout/usePersonalDetailsStep.js:1:
Module../.shopware-pwa/source/logic/checkout/usePersonalDetailsStep.js
webpack/bootstrap:25:
__webpack_require__
server.js:36924:96
Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./.shopware-pwa/source/components/checkout/summary/PersonalDetailsSummary.vue?vue&type=script&lang=js&
webpack/bootstrap:25:
__webpack_require__
patzick commented 3 years ago

hey, @xdrago1 do you still have this problem? If so please provide commands you're using to set up the project. Which OS and Node version you're using.

mkucmus commented 3 years ago

@xdrago1 any updates here?

mmeester commented 3 years ago

I'm having the same issue on plugin initialization:

client.js?06a0:84 Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.
    at assert (vue-composition-api.esm.js?2854:34)
    at getVueConstructor (vue-composition-api.esm.js?2854:104)
    at isComponentInstance (vue-composition-api.esm.js?2854:223)
    at setupAccessControl (vue-composition-api.esm.js?2854:489)
    at reactive (vue-composition-api.esm.js?2854:673)
    at ref (vue-composition-api.esm.js?2854:383)
    at sharedRef (composables.esm.js?58f0:2530)
    at useSessionContext (composables.esm.js?58f0:524)
    at eval (shopware.mixed.js?d63b:62)
    at _callee2$ (index.js?f26e:66)

The composition-api plugin is first in the nuxt.config.js as loaded plugins

patzick commented 3 years ago

this should be fixed by now