Skip to content

[Bug]: shopify app generate extension with a Typescript flavor fails on the graphql-code-generator command #6132

@kayluhb

Description

@kayluhb

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Extension

Expected behavior

Generating an extension targeting Typescript via the cli should succeed.

Actual behavior

The npm exec -- graphql-code-generator --config package.json command fails to complete stating Cannot convert undefined or null to object

Verbose output

Verbose output

Running the command directly (not using the shopify cli)

npm exec -- graphql-code-generator --config package.json --verbose
(node:93831) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✖ Parse configuration
  → Cannot convert undefined or null to object
  Generate outputs
Cannot convert undefined or null to object
Cannot convert undefined or null to object

Reproduction steps

▶ shopify app generate extension
?  Type of extension?
✔  Cart and checkout validation — Function

?  Name your extension:
✔  purchase-validation

?  What would you like to work in?
✔  TypeScript

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Building GraphQL types ...
(node:93510) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

── external error ──────────────────────────────────────────────────────────────

Error coming from `npm exec -- graphql-code-generator --config package.json`

Command failed with exit code 1: npm exec -- graphql-code-generator --config package.json
(node:93510) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland
alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Cannot convert undefined or null to object
[07:57:31] Parse configuration [started]
[07:57:31] Parse configuration [failed]
[07:57:31] → Cannot convert undefined or null to object

────────────────────────────────────────────────────────────────────────────────

Operating System

MacOS Sequoia Version 15.5 (24F74)

Shopify CLI version (shopify --version)

@shopify/cli/3.82.1 darwin-arm64 node-v22.6.0

Shell

iterm2 w/ zsh

Node version (run node -v if you're not sure)

v22.6.0

What language and version are you using in your application?

Typescript

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions