Skip to content

Cannot find module #21

Description

@ToktogonovA

I have a TypeScript file that I'm processing using importFromStringSync.

The file contains an import of an interface and an enum from different folders.

The interface import works fine, but the enum import fails with an error stating that the module cannot be found.

Why does this happen?

Here is my file:

import { IConfig } from "../types";
import { PathEnum } from "../../router/config";

export const CONFIG: IConfig = {
  hiddenRoute: [PathEnum.Test],
};

Error: Cannot find module '../../router/config'

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions