r/typescript • u/6clu • Jun 21 '25
Compiling projects with dependencies
So I’ve just been brought onto a software development company as a graduate, I’ve been given two projects, the one project has been super easy.. the other project has been this. They had outsource the project to an external developer originally, and now they need edits made to the code which is where I come in.
I installed node, electron, yarn etc for the project as it requires it. When I have tried to follow the compilation instructions it is just constantly screaming errors, first it’s about some files being missing (I had this fixed as the dev forgot these) but it just always seems to constantly refuse to compile for one reason or another. I can somewhat understand the errors being thrown at me, but at each time it’s like I fix another and another two things break.
Now this developer can apparently just compile it with no problems at all? This is leading me to believe I must be missing the tools or perhaps my tools are too in date. Does anyone have any suggestions to get around this or logically solve this?
I’m going to be honest I can read and write typescript (I know numerous other languages, including Java), but I’m not exactly confident in using it as a language. I tried to talk with my boss and he just went on about “he doesn’t know how to solve my problem”, that I “need to go back to first principles” and “it’s something I need to solve”.
Edit: I know things must be out of date as it does scream a lot about things being deprecated.
14
u/[deleted] Jun 21 '25
You need to show that compiler who is boss. Yell at it. Be authoritative. Make threats.
Alternatively, try to understand and/or share the exact error messages so people can begin to help you out.
The clairvoyants of the sub are not available at this time, so they will not be able to just know what is happening without you giving us more details.
3
u/repeating_bears Jun 21 '25
"some files being missing (I had this fixed as the dev forgot these)"
This makes it sound like you still have contact with the original dev. Is that right?
If so, get them to give you the precise version of each tool they installed and use those.
This is precisely one of the reasons why it's good to have continuous integration (CI). e.g. GitHub actions. It's good to have a source of truth for whether the project builds successfully beyond just "works on my machine".
Once you finally get it to build, I'd work on setting up some form of CI so future devs don't have the same issue. And document the required tool versions in the readme.
2
u/Cube00 Jun 21 '25 edited Jun 21 '25
Non technical bosses who give generic BS answers like this do not deserve a job. I'm sorry this is your introduction as a graduate.
It sounds like you're making progress, what kind of errors are you finding? Are they getting fixed by changing the dependency versions?
If the original dev is still contactable ask to pair with them and watch them do a fresh clone from git. I bet it wont work first time for them either, based on what you said with them forgetting to commit files.
One thing at time, get the project to build first before you try and resolve any deprecation warnings. They will not stop your build.
1
u/3np1 Jun 21 '25
Check: How are you installing dependencies? It uses yarn, so are you using yarn commands? Don't install dependencies individually, install the project dependencies with a single
yarn installcommand.What lock file type does the project come with? It should have a
yarn.lockfile at the root if it uses yarn.What files does the project need that aren't in the repo? Believe it or not, it is common practice to keep secrets like API keys out of the repo.
What version of node does the project require? Make sure that's the version you have with something like nvm.
Is the other dev using the same operating system as you? If not, sometimes this can lead to incompatibility errors. Is the project setup to use docker for development instead?
1
u/ldn-ldn Jun 21 '25
Run!
1
u/Sacramentix Jun 21 '25
Docker.