-
Hey, At some point in my project while upgrading some packages I started getting this issue with my
I've tried all of the recommended solutions and still get the same error, the main thing is I can't reproduce it in another repo. It works fine when I create a new one but in my current project I get the following error
Here is a shortened version of my package file
Following is my codegen.yml file
I wish I had a repo with the issue to provide to you but unfortunately I don't as I can't reproduce it in a fresh repo. Here are the steps I took to try and solve this:
I just can't seem to figure out how to solve this when it should really be an easy fix and definitely something wrong with my configurations or packages. Could really use another set of eyes on this as maybe I'm missing something small. What gets me even more is in a new clean install repo this works fine. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
If possible, try to create a reproduction. Otherwise, we are not going to be able to test and fix this. |
Beta Was this translation helpful? Give feedback.
-
Hey, yea I figured as much thanks for the reply, but I was able to get through this issue actually. I'm not sure what was the exact root cause, most likely something was wrong with my package-lock.json file even though I would delete it and reinstall, however since I was able to create a fresh clean repo with my package.json file that worked and had no issues, I just copied the package-lock.json file from that project to my existing one and this seemed to have magically resolved everything. I can't say that is a good solution, nor do I know why exactly this happened but in doing so all installs, reinstalls and code generations worked perfectly afterwards. I suspect maybe there must have been some sort of cache hanging around somewhere that would cause my lock file to have missing dependencies even if I delete and reinstalled everything from within the same project? (maybe .git ?). Anyway all good. Thanks for the feedback and taking the time to read it. Great package, keep up the good work! |
Beta Was this translation helpful? Give feedback.
-
For anyone else having this issue, deleting the package-lock.json and node_modules folder and regenerating the package-lock.json file fixes the issues. There's probably some nested dependency that is conflicting, but I wasn't able to narrow it down to the exact package. |
Beta Was this translation helpful? Give feedback.
-
Installing @babel/runtime as a devDependency fixed it for me. |
Beta Was this translation helpful? Give feedback.
-
This post is old but today in July 2023, some of the most recent dependencies has some conflicts, so instead of using the most recent version, in my dev dependencies I get these versions to work ang to generate the typing: "devDependencies": { indeed version "@graphql-codegen/cli": "^4.0.1" etc did not work properly for me. |
Beta Was this translation helpful? Give feedback.
Hey, yea I figured as much thanks for the reply, but I was able to get through this issue actually.
I'm not sure what was the exact root cause, most likely something was wrong with my package-lock.json file even though I would delete it and reinstall, however since I was able to create a fresh clean repo with my package.json file that worked and had no issues, I just copied the package-lock.json file from that project to my existing one and this seemed to have magically resolved everything.
I can't say that is a good solution, nor do I know why exactly this happened but in doing so all installs, reinstalls and code generations worked perfectly afterwards. I suspect maybe there must have b…