GithubHelp home page GithubHelp logo

@Body transform issue: The `metatype` property of the 2nd Arg to ValidationPipe.transform(v, metadata) is `undefined` during jest e2e `supertest` run. about nest HOT 8 CLOSED

m-fire avatar m-fire commented on April 28, 2024
@Body transform issue: The `metatype` property of the 2nd Arg to ValidationPipe.transform(v, metadata) is `undefined` during jest e2e `supertest` run.

from nest.

Comments (8)

m-fire avatar m-fire commented on April 28, 2024 1

@micalevisk May I request a review? I've updated the minimal reproduction comments and reproduction procedure above, and I've posted sample code as you suggested - it's a minimal scenario test, so there's a lot of source code.

from nest.

micalevisk avatar micalevisk commented on April 28, 2024 1

I've no ideia ๐Ÿค”

from nest.

micalevisk avatar micalevisk commented on April 28, 2024

Please provide a minimum reproduction repository. You can start one by running npm init nest in your terminal

why reproductions are required

from nest.

m-fire avatar m-fire commented on April 28, 2024

@micalevisk I think this issue is related to the import/export behavior of Typescript. What do you think? I think it's right, it suddenly started working again ๐Ÿ˜‘. All import/export code is working fine during the overhaul. I've had a hard time with this, you've had a hard time, so you can rest now.๐Ÿ˜Œ

from nest.

m-fire avatar m-fire commented on April 28, 2024

This is the second time this has happened to me.

in src/module/auth/feature/sign-in-user.api.ts

before

: The Request was placed inside the auth module outside the Api class.
import { AuthToken, SignInUserRequest } from '@src-module/auth/feature'

after

: Located in the same folder as the API class
import { SignInUserRequest } from './sign-in-user.request'

I thought it was fixed. It was my mistake. It's hard...

from nest.

m-fire avatar m-fire commented on April 28, 2024

I'll commit the rest of the code to the repository to reflect this, so take a look when you need to.

from nest.

m-fire avatar m-fire commented on April 28, 2024

Let's reopen it first.
because it's impossible to reproduce what happened๐Ÿ˜‘. I don't know how it was fixed.
I don't think it's just an import/export issue with Typescript. I feel like I'm getting lost in a maze...

from nest.

kamilmysliwiec avatar kamilmysliwiec commented on April 28, 2024

I'm sure it's just an import/export issue, possibly caused by barrel files (index.ts) introducing a cyclic import in your code, leading to TS metadata being undefined in a specific context

from nest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.