Skip to content

Module Resolution Failure cubejs-client #10015

@alexechoi

Description

@alexechoi

Describe the bug
A clear and concise description of what the bug is.

When importing Cube within a Mastra workflow I get a

To Reproduce
Steps to reproduce the behavior:

  1. Make a Mastra agent workflow that imports cubejs-client
  2. Run the project
  3. You will see the below error

Other modules import fine so the module import issue is specifically related to cubejs clinet

Expected behaviour
Import Resolution to complete

./node_modules/@cubejs-client/core/dist/src/index.js
    at finalizeResolution (node:internal/modules/esm/resolve:275:11)
    at moduleResolve (node:internal/modules/esm/resolve:860:10)
    at defaultResolve (node:internal/modules/esm/resolve:984:11)
    at nextResolve (node:internal/modules/esm/hooks:748:28)
    at resolve (./node_modules/mastra/dist/commands/dev/telemetry-resolver.js:4:12)
    at nextResolve (node:internal/modules/esm/hooks:748:28)
    at Hooks.resolve (node:internal/modules/esm/hooks:240:30)
    at handleMessage (node:internal/modules/esm/worker:199:24)
    at checkForMessages (node:internal/modules/esm/worker:141:28)
    at process.<anonymous> (node:internal/modules/esm/worker:160:5) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: './node_modules/@cubejs-client/core/dist/src/ResultSet'
}

Node.js v22.17.0

If I go into @cubejs-client/core/dist/src/index.js and add .js to some of the imports it resolves some issues however this is not sustainable for the full module

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