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'
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:
Error: Cannot find module '../../router/config'