samchon/nestia

[Bug Report] Parsing incorrect module paths

Closed this issue · 1 comments

Bug Report

When running the nestia swagger command, the path to the prisma client module is parsed to the wrong location. I have pointed the path @Prisma to the location prisma/client via the tsconfig > path setting. When running the tsc -p tsconfig.build.json command, the path is built correctly. However, when running the nestia swagger command, the path to @Prisma seems to be parsed to the wrong location.

In my code, depth is encountered once more.

  • correct result: ../../../prisma/client
  • nestia build result: ../../../../../prisma/client

I've created a project environment to verify this bug.

git clone https://github.com/rojiwon123/nestia-bug-report.git
cd nestia-bug-report
npm i
npm run bug

Summary

Parsing incorrect module paths

test repository

Nestia Version

  • "@nestia/core": "^3.2.0",
  • "@nestia/sdk": "^3.2.0",
  • "nestia": "^5.3.0",

it is not @nestia/sdk bug, and i solved it!

  • before, in tsconfig.json
"paths": {
            "@PRISMA": ["./prisma/client"],
            "@SRC/*": ["./src/*"],
            "@TEST/*": ["./src/test/*"]
        },
  • after, in tsconfig.json
"paths": {
            "@PRISMA": ["./prisma/client/index"],
            "@SRC/*": ["./src/*"],
            "@TEST/*": ["./src/test/*"]
        },