Skip to content

Conversation

stwiname
Copy link

@stwiname stwiname commented Aug 11, 2025

I was facing an issue when using npm where there was another minimatch provided and because the utils package didn't specify minimatch itself it would run into the following error:

ERRROR TypeError: (0 , minimatch_1.default) is not a function
    at /Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@cosmology/utils/main/proto.js:186:44
    at Array.some (<anonymous>)
    at isRefIncluded (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@cosmology/utils/main/proto.js:182:26)
    at isRefExcluded (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@cosmology/utils/main/proto.js:220:38)
    at /Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@cosmology/proto-parser/main/store.js:238:57
    at Array.map (<anonymous>)
    at ProtoStore.traverseAll (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@cosmology/proto-parser/main/store.js:227:14)
    at new TelescopeBuilder (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@hyperweb/telescope/main/builder.js:89:20)
    at exports.default (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/node_modules/@hyperweb/telescope/main/index.js:22:21)
    at generateProto (/Users/scotttwiname/Projects/cosmos-subql-starter/Injective/injective-starter/.yalc/@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

I have removed minimatch from parser as there are no usages within this package and instead moved it to utils where there is usage. This will mean a specific version is used.

@stwiname
Copy link
Author

@Zetazzz can you please take a look at this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant