Skip to content

Custom Logger not found with mesh start #6508

Open
@sam-lewis

Description

@sam-lewis

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on
    CodeSandbox

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

A custom logger definition works fine with mesh dev but fails with yarn mesh then mesh start

To Reproduce Steps to reproduce the behavior:

💥 🕸️  Mesh Error: Cannot find module './logger'
Require stack:
- /workspace/.mesh/index.ts
- /workspace/node_modules/@graphql-mesh/utils/cjs/defaultImportFn.js

Expected behavior

  • mesh starts when a logger is configured in meshrc.yml and mesh start is run.

Environment:
https://codesandbox.io/p/sandbox/spring-sun-ltgyh5

Additional context

It looks like the logger import is missing a ../ in the generated index.ts.
I tried with a custom fetch which has the correct relative import applied.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions