App reviews, troubleshooting, and recommendations
I am getting this error in my editor TS2786: CalloutBanner cannot be used as a JSX component. this error is shown for all the components from
@shopify/post-purchase-ui-extensions-react
I am using the default template for post purchase ui.
I added a tsconfig.json file with this settings:
"compilerOptions": {
"jsx": "react-jsx",
"allowSyntheticDefaultImports": true
},
"include": ["./src"]
}
but with no luck I am still getting those errors. The app runs perfectly it is just that it is showing those errors in the editor and it is so annoying.
I also tried changing this:
render("Checkout::PostPurchase::Render", ({ extensionPoint, storage }) => (
<App extensionPoint={extensionPoint} storage={storage} />
))
I had the same issue but was able to fix it by adding the post-purchase types to my tsconfig.json. Hope it helps!
{
"compilerOptions": {
"jsx": "react-jsx",
"types": [
"@shopify/post-purchase-ui-extensions-react"
]
},
"include": [
"./src"
]
}
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025