Hello,
I have app in app store. I would like to extend app via post-purchase checkout extension. So I try to run command:
npm run shopify app generate extension -- --template post_purchase_ui --name my-post-purchase-ui-extension
Look like that everything is correct:
But when I try to run command:
npm run dev
I can see error:
? Match my-post-purchase-ui-extension (local name) with post-purchase-ui (name on Shopify Partners, ID: XYZ)?
✔ Yes, match to existing extension
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
ERROR Cannot read properties of null (reading 'useContext')
node_modules/@shopify/app/node_modules/react/cjs/react.development.js:1618:21
1615: }
1616: }
1617:
1618: return dispatcher.useContext(Context);
1619: }
1620: function useState(initialState) {
1621: var dispatcher = resolveDispatcher();
- useContext (node_modules/@shopify/app/node_modules/react/cjs/react.development.js:1618:21)
- useStdin (node_modules/@shopify/app/node_modules/ink/build/hooks/use-stdin.js:6:24)
- Dev (node_modules/@shopify/app/dist/cli/services/dev/ui/components/Dev.js:13:53)
- renderWithHooks (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:7478:18)
- mountIndeterminateComponent (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:11247:13)
- beginWork (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:12760:16)
- beginWork$1 (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:19569:14)
- performUnitOfWork (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:18703:12)
- workLoopSync (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:18609:5)
- renderRootSync (node_modules/@shopify/cli-kit/node_modules/react-reconciler/cjs/react-reconciler.development.js:18577:7)
^C%
More details:
Node version: v21.6.1
NPM version: 10.4.0
Current package.json:
{
"name": "app",
"version": "1.0.0",
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"push": "shopify app push",
"generate": "shopify app generate",
"deploy": "shopify app deploy",
"info": "shopify app info"
},
"dependencies": {
"@shopify/app": "^3.55.4",
"@shopify/cli": "^3.55.4",
"@shopify/post-purchase-ui-extensions-react": "^0.13.4",
"react": "^17.0.2"
}
}
Any updates?
