Search code examples
javascriptnode.jstypescriptnestjstypeorm

Calling file from different folder / source in my project


I have 2 sources in my project. How can I import a file from MyProject in nest-project-payment?

This is the file structure of my project:

File Structure

Tried using the following import statement:

import { User } from "MyProject/src/entity/User";

Solution

  • import { User } from "../../../MyProject/src/entity/User";
    

    With ../ you move one folder up.