You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
<divhiddenid="snipcart"
data-api-key="my-key-here"
><billingsection="top"><fieldsetclass="snipcart-form__set"><divclass="snipcart-form__field"><snipcart-labelfor="storeToPickUpFrom" class="snipcart__font--tiny">
Store to pick-up from
</snipcart-label><snipcart-selectname="storeToPickUpFrom" class="snipcart-form__select snipcart__font--secondary snipcart__font--bold"><optionvalue="1">One</option><optionvalue="2">Two</option><optionvalue="3"> Three</option><optionvalue="4">Four</option></snipcart-select></div></fieldset></billing></div>
It first tells you to make sure to exclude custom elements from component resolution via compilerOptions.isCustomElement, which is fine and can be handled, but then still the following problem I can't resolve:
[Vue warn]: Hydration node mismatch:
- Client vnode: billing
- Server rendered DOM: <!---->
at <Default >
at <AsyncComponentWrapper >
at <BaseTransition mode="out-in" appear=false persisted=false ... >
at <Transition name="layout" mode="out-in" >
at <Anonymous name="default" >
at <App key=1 >
at <NuxtRoot>
In the reproduction it can be seen, that it is not displayed correct. Instead of displaying it on the cart in the billing section it is displayed on the page. For the reproduction it is necessary to create a free snipcart account and paste the key into data-api-key. Hope somebody can help me out here.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered:
The issue here is that Snipcart is transforming your HTML before Vue has a chance to hydrate it, meaning the HTML doesn't match between server/client. You may be able to solve using the upcoming #5688. Or you can defer loading the snipcard JS until Nuxt has mounted to the HTML.
nuxt
locked and limited conversation to collaborators
Jul 4, 2022
Environment
Linux
v16.15.0
3.0.0-rc.3
[email protected]
vite
css
,build
,vue
,vite
,meta
,runtimeConfig
-
-
Reproduction
https://stackblitz.com/edit/github-rytvwm?file=layouts/default.vue
Describe the bug
Using Snipcart with Nuxt works well if you use it just like this
But if you use an order custom field, which includes native custom elements, you get errors (the below example is from https://docs.snipcart.com/v3/setup/order-custom-fields):
It first tells you to make sure to exclude custom elements from component resolution via compilerOptions.isCustomElement, which is fine and can be handled, but then still the following problem I can't resolve:
In the reproduction it can be seen, that it is not displayed correct. Instead of displaying it on the cart in the billing section it is displayed on the page. For the reproduction it is necessary to create a free snipcart account and paste the key into
data-api-key
. Hope somebody can help me out here.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: