Why am I unable to create a subscription app extension using Shopify CLI?

Solved

Why am I unable to create a subscription app extension using Shopify CLI?

Jeremy46
Shopify Partner
9 2 0

Hi

My name is jeremy . I'm rather new to using shopify cli, and I've been trying to create a subscription app extension .

but after running "shopify extension create" and choosing my app and extension name , the "initializing project" process stops with this error.


┃ > admin-ui-extensions-template@0.1.0 generate
┃ > ts-node -O "{\"esModuleInterop\": true}" ./scripts/generate "--type=PRODUCT_SUBSCRIPTION"

┃ undefined:1
┃ {\esModuleInterop":
┃ ^

┃ SyntaxError: Unexpected token \ in JSON at position 1
┃ at JSON.parse (<anonymous>)
┃ at parse (MY_EXTENSION_FILE\node_modules\ts-node\dist\index.js:103:45)
┃ at arg (MY_EXTENSION_FILE\node_modules\arg\index.js:122:24)
┃ at main (MY_EXTENSION_FILE\node_modules\ts-node\dist\bin.js:34:18)
┃ at Object.<anonymous> (MY_EXTENSION_FILE\node_modules\ts-node\dist\bin.js:446:5)
┃ at Module._compile (node:internal/modules/cjs/loader:1091:14)
┃ at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10)
┃ at Module.load (node:internal/modules/cjs/loader:971:32)
┃ at Function.Module._load (node:internal/modules/cjs/loader:812:14)
┃ at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
┃ npm ERR! code 1
┃ npm ERR! path MY_EXTENSION_FILE
┃ npm ERR! command failed
┃ npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ts-node -O {\esModuleInterop\": true}" ./scripts/generate --type=PRODUCT_SUBSCRIPTION

┃ npm ERR! A complete log of this run can be found in:
┃ npm ERR! C:\User\AppData\Local\npm-cache\_logs\2021-06-30T00_26_18_163Z-debug.log
┗━━ X There was an error while initializing the project. ━━━━━━━━━━━━ (3.24s) ━━
* Fix the errors and run shopify extension create again.

I've been looking everywhere for any sort of answer but I truly cant find what's causing this issue.

any idea's would be greatly appreciated 

thank you

 

Accepted Solution (1)

Jeremy46
Shopify Partner
9 2 0

This is an accepted solution.

you can find the answer here!

View solution in original post

Reply 1 (1)

Jeremy46
Shopify Partner
9 2 0

This is an accepted solution.

you can find the answer here!