Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with nestjs? #248

Closed
kimprosh opened this issue Feb 16, 2023 · 10 comments
Closed

How to use with nestjs? #248

kimprosh opened this issue Feb 16, 2023 · 10 comments
Assignees
Labels
question Further information is requested

Comments

@kimprosh
Copy link

I try to use nestia in a NestJS project but have an error here:

Error on nestia.core.TypedRoute.Post(): no transform has been configured. Configure "tsconfig.json" file following [Guide Documents](https://github.com/samchon/nestia/wiki/Setup#tsconfigjson).

my tsconfig.ts

{
  "compilerOptions": {
    "module": "commonjs",
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "target": "es2017",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false,
    "plugins": [
      { "transform": "typescript-transform-paths" },
      { "transform": "typia/lib/transform" },
      { "transform": "@nestia/core/lib/transform" },
      { "transform": "nestia" }
    ],
    "strict": true
  }
}
@samchon samchon self-assigned this Feb 16, 2023
@samchon samchon added the question Further information is requested label Feb 16, 2023
@samchon
Copy link
Owner

samchon commented Feb 16, 2023

https://github.com/samchon/nestia/wiki/Setup#ttypescript-2

compile it through ttsc command, or use ts-patch

@kimprosh
Copy link
Author

So, Can not use nestjs cli when use nestia in nestjs project?

https://github.com/samchon/nestia/wiki/Setup#ttypescript-2

compile it through ttsc command, or use ts-patch

@samchon
Copy link
Owner

samchon commented Feb 16, 2023

Nest CLI has webpack option? Then follow webpack configuration.

If not, try ts-patch method and tell me the result.

@kimprosh
Copy link
Author

Hm, It seems complex to use nestia in NestJS, right?

@samchon
Copy link
Owner

samchon commented Feb 16, 2023

It never difficult. What about using npx nestia start <directory> command instead?

@kimprosh
Copy link
Author

I tried, and it seems is not a way for run NestJS project normally

@samchon
Copy link
Owner

samchon commented Feb 16, 2023

Okay, I'll try nest cli and tell you how to.

@kimprosh
Copy link
Author

thanks so much!

@samchon
Copy link
Owner

samchon commented Feb 16, 2023

npx nestia setup --compiler ts-patch

Very easy. Just use ts-patch, then everything be fine.

It would better to change default compiler from ttypescript to ts-patch for who are using NestJS starter kit.

@kimprosh
Copy link
Author

kimprosh commented Feb 16, 2023

It works, tks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants