Skip to content

Can't create basic Injective project #2863

Open
subquery/subql-cosmos
#343

Description

@bokobza

Hi, I'm trying to create a new injective project and I'm not able to make it work.

To reproduce, just run

> subql init inj-staker-test-project --installDependencies
> npm run codegen

This gives me


> inj-staker-test-project@0.0.1 codegen
> subql codegen

* Schema SpotLimitOrder generated !
* Models index generated !
ERRROR TypeError: (0 , minimatch_1.default) is not a function
    at /Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-utils/main/proto.js:126:40
    at Array.some (<anonymous>)
    at isRefIncluded (/Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-utils/main/proto.js:122:68)
    at isRefExcluded (/Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-utils/main/proto.js:149:38)
    at /Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-proto-parser/main/store.js:209:57
    at Array.map (<anonymous>)
    at ProtoStore.traverseAll (/Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-proto-parser/main/store.js:199:40)
    at new TelescopeBuilder (/Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-telescope/main/builder.js:64:20)
    at exports.default (/Users/sys01/inj-staker-test-project/node_modules/@subql/x-cosmology-telescope/main/index.js:22:21)
    at generateProto (/Users/sys01/inj-staker-test-project/node_modules/@subql/common-cosmos/src/codegen/codegen-controller.ts:257:20)
 ›   Error: Failed to generate from protobufs. (0 , minimatch_1.default) is not a function, , undefined

Activity

  1. stwiname commented on Jul 27, 2025

    @stwiname
    Collaborator

    I can't manage to reproduce this.

    What nodejs version are you using and i assume you have the latest dependencies if its a freshly created project

  2. lorrod commented on Aug 8, 2025

    @lorrod
    Contributor

    I had the same issue (node -v -> v22.15.0). I simply followed this article and selected the Osmosis chain.

  3. stwiname commented on Aug 11, 2025

    @stwiname
    Collaborator

    I have managed to reproduce this issue and I have created a PR on the relevant package to fix this. hyperweb-io/telescope#802

    This also only seems to be an issue when using npm. yarn works without issue.

  4. lorrod commented on Aug 11, 2025

    @lorrod
    Contributor

    I tried running a clean install with yarn, but I’m still encountering the issue. Do you have a prebuilt version I could test?

  5. lorrod commented on Aug 20, 2025

    @lorrod
    Contributor

    up

  6. stwiname commented on Aug 24, 2025

    @stwiname
    Collaborator

    @lorrod i don't have a prebuilt version, what version of yarn did you try with?

  7. minionlancer28 commented on Sep 22, 2025

    @minionlancer28

    The same issue.
    I used this command.

    npx @subql/cli init example
    ? Select a network Thorchain
    ? Select a template project thorchain-starter
    ...

    cd example && yarn build
    ERRROR TypeError: (0 , minimatch_1.default) is not a function
    ...

    how can we resolve this issue?

  8. stwiname commented on Sep 22, 2025

    @stwiname
    Collaborator

    Adding minimatch@5 as a dependency to the starter project fixes the build issue.

    Making some noise about this PR and getting it merged/released hyperweb-io/telescope#802 would solve the underlying issue.

  9. minionlancer28 commented on Sep 23, 2025

    @minionlancer28

    I appended "minimatch@5.1.6" into package.json as dependency.
    There was another issue.

    Error: [tsl] ERROR
    › TS2688: Cannot find type definition file for 'minimatch'.
    › The file is in the program because:
    › Entry point for implicit type library 'minimatch'
    error Command failed with exit code 2.

    how to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy