I created a new extension under our Shopify app by using this command:
npm run shopify app generate extension -- --template product_discounts --name product-discount
In the terminal, I moved inside the product-discount folder and run this command:
npm run typegen
The issue was it returned this error:
I am not sure why this is happening but I guarantee that package.json is inside the product-discount directory.
{
"name": "product-discount",
"version": "0.0.1",
"license": "UNLICENSED",
"scripts": {
"shopify": "npm exec -- shopify",
"typegen": "npm exec -- shopify app function typegen",
"build": "npm exec -- shopify app function build",
"preview": "npm exec -- shopify app function run",
"test": "vitest"
},
"codegen": {
"schema": "schema.graphql",
"documents": "src/*.graphql",
"generates": {
"./generated/api.ts": {
"plugins": [
"typescript",
"typescript-operations"
]
}
},
"config": {
"omitOperationSuffix": true
}
},
"devDependencies": {
"vitest": "^0.29.8"
},
"dependencies": {
"@shopify/shopify_function": "0.1.0",
"javy": "0.1.1"
},
"main": "index.js",
"author": "",
"description": ""
}
This is blocking me from updating the product-discount extension function.

