Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Allow to skip rechoir/interpret autoload #6329

@josser

Description

@josser

Knex currently uses rechoir / interpret to auto-load TypeScript runtimes.

When running Knex with ts-exec (via Node’s --import), Knex still attempts to resolve several legacy TypeScript loaders, which results in noisy warnings printed at the start of every CLI invocation.

Failed to load external module ts-node/register
Failed to load external module typescript-node/register
Failed to load external module typescript-register
Failed to load external module typescript-require
Failed to load external module sucrase/register/ts
Failed to load external module @babel/register

rechoir does not currently recognize or support @poppinss/ts-exec, even though it works correctly as a TypeScript runtime:

NODE_OPTIONS='--import @poppinss/ts-exec' knex migrate:latest

So, maybe we need an option to allow configuring or disabling rechoir runtime probing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions