I’m having an issue with a new extension where when I run “npm run dev” on the app, I get the following error:
Build failed with 1 error: │
│ extensions/liftgate/src/Checkout.jsx:13:2: ERROR: No matching export in │
│ "extensions/liftgate/node_modules/@shopify/ui-extensions/build/esm/surfaces/checkout.mjs" for │
│ import "useDeliveryGroups"
I’m currently using “useDeliveryGroups” in another checkout-ui extension in the same app without any issues.
This is the contents of my new extensions package.json:
{
"name": "liftgate",
"private": true,
"version": "1.0.0",
"license": "UNLICENSED",
"dependencies": {
"react": "^18.0.0",
"@shopify/ui-extensions": "2024.4.x",
"@shopify/ui-extensions-react": "2024.4.x"
},
"devDependencies": {
"@types/react": "^18.0.0",
"react-reconciler": "0.29.0"
}
}
The “dist/liftgate.js” file is basically empty:
(() => {
})();
//# sourceMappingURL=liftgate.js.map
It appears that the deliveryGroups API should be available to this extension target: https://shopify.dev/docs/api/checkout-ui-extensions/unstable/targets/shipping/purchase-checkout-delivery-address-render-after
Thanks for any help!