#Typescript Github Actions Compile Fail

23 messages · Page 1 of 1 (latest)

random saddle
#

Hi all, I'm setting up a github action to compile my typescript, using tsc --noEmit. This works great on my machine, and I have no errors or warnings from the compiler, however when I push and the action runs, I get an error for seemingly every single type, it seems like typescript just isn't checking anything. All of my packages are up to date, I've tried a clean install, errors and yaml below. I'm using pnpm, but I've had the exact same issue with npm

frosty quartz
#

it's unlikely to matter, but pnpm/action-setup will also run pnpm install by default

random saddle
#

Ah good to know, thanks. The install step has never failed but I'll remove the separate install command

frosty quartz
#

It won't do caching AFAIK, so, you probably just want to read the action-setup readme for info on how to do it, should just be adding a "no install" config. but, right now, you're not getting any caching

#

this doesn't really affect tsc, I would assume, though 😅

random saddle
#

I've just reverted back to npm to keep it simple until I resolve this issue, same errors occuring, any thoughts?

frosty quartz
#

Perhaps pass --traceResolution to see where it's attempting to resolve things?

random saddle
#

Pretty sure it shouldn't be using Node10 🤔

#

This is my tsconfig for reference

frosty quartz
#

could be that things are running in the wrong dir entirely, so you're loading some random code instead of your actual project

random saddle
#

Any way to diagnose that? This also comes up further down

frosty quartz
#

in your package.json script, try running pwd && tsc to get it to print the working directory

#

nothing about that screenshot looks wrong to me

#

the earlier ones, sure

random saddle
frosty quartz
#

and tsconfig.json definitely exists in that dir? maybe ls -lh or something just to really, really be sure

random saddle
#

definitely does, will do tho

frosty quartz
#

very, very odd

random saddle
#

Replaced with a default tsconfig from tsc --init, same thing

#

Created a minimal reproduction but that works fine, so I'm now inclined to think it's something with my dependencies