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

No @generated/type-graphql folder in node_modules #407

Open
samerkassem82 opened this issue Jul 23, 2023 · 7 comments
Open

No @generated/type-graphql folder in node_modules #407

samerkassem82 opened this issue Jul 23, 2023 · 7 comments
Labels
community Something initiated by the community question Further information is requested

Comments

@samerkassem82
Copy link

Describe the Bug
I have followed your guide https://prisma.typegraphql.com/docs/basics/installation

No @generated/type-graphql folder in node_modules was generated

To Reproduce
Following your guide here on node 18.16.0?

Environment (please complete the following information):

  • OS: Windows 10
  • Node 18.16.0

{
"devDependencies": {
"prisma": "^5.0.0",
"typegraphql-prisma": "^0.27.0"
},
"scripts": {
"preinstall": "nvm install && nvm use"
},
"dependencies": {
"@apollo/server": "^4.8.1",
"@prisma/client": "^5.0.0",
"@types/graphql-fields": "^1.3.5",
"graphql": "^15.0.0",
"graphql-fields": "^2.0.3",
"graphql-scalars": "^1.22.2",
"tslib": "^2.6.0",
"type-graphql": "^1.1.1"
}
}

Additional Context

image

image

@MichalLytek
Copy link
Owner

Sorry but unable to reproduce. Please check your schema.prisma file.

image

@MichalLytek MichalLytek added question Further information is requested community Something initiated by the community labels Jul 24, 2023
@vleandersson
Copy link

vleandersson commented Oct 11, 2023

I got the same issue, setting emitTranspiledCode = false does output the generated code correctly but with the transpilation turned on nothing is emitted. Still investigating so will get back here if I find anything else.

Finding 1: The @generated/type-graphql folder is still generated

@ivankhm
Copy link

ivankhm commented Oct 11, 2023

Faced the same issue, but only while building a docker image. Can confirm, that emitTranspiledCode = false fixes my problem.

base is node:18.16-alpine.
package versions are: "@prisma/client": "^5.4.2","prisma": "^5.4.2", "reflect-metadata": "^0.1.13", "type-graphql": "2.0.0-beta.3", "typegraphql-prisma": "^0.27.0", "typescript": "5.2.2".

Same setup locally on MacOS it works fine. I'm trying to pin point the difference and create a repo.

@vleandersson
Copy link

vleandersson commented Oct 12, 2023

@ivankhm amazing investigation. If it helps, ts-morph (https://ts-morph.com/setup/) is the package used to emit the transpiled code. What's your node version locally? Thinking this might be some Node issue? 🤔

One thing I've noticed is that it takes a very long time to transpile the code for me (adds maybe 1-2 min vs 10s without transpiling...)

Btw, I'm using pnpm (on MacOS) to run the scripts. What are you using @ivankhm ?

@vleandersson
Copy link

@MichalLytek without spending too much time on your end - do you happen to have an example repo I can quickly clone and debug this issue in? 🙏

@MichalLytek
Copy link
Owner

My debug repo is the experiments folder in this repo - I test there all fixes and develop all the features 😉

@vleandersson
Copy link

Brilliant, will have a look and get back to you 🙏

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

No branches or pull requests

4 participants