Skip to content

Cannot find module #21

@ToktogonovA

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'

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