This message was deleted.
# typescript
s
This message was deleted.
f
ah i figured out my issue currently, my repos were in a weird state (was on the wrong branch for a component resources repo). but still, this keeps happening to me and i haven't figured out how to debug it
hm. i guess i can just run
tsc
lol. somehow i'm not used to actually running it, when i've used ts in the past it's usually baked into e.g. a bundler or my editor
welp, i fixed the error that
tsc
reported and I am still getting the same error message 😭
just kidding i'm getting a different error that actually points back to my code, so maybe i'm getting somewhere...
l
What is project-pulumi? If it's your repository, why (how?) are you running it directly? Is this an automation-api program, or a vanilla Pulumi project?
f
its a placeholder for the name of my pulumi project directory. i am running it directly at the moment
i managed to resolve that latter issue by deleting node_modules and re-running npm install in my component resources project
i think something about running
tsc
messed with my project 😞
probably want to run it with some option that doesnt emit any files
l
It seems odd that your Pulumi CLI is wrapping a call that's throwing an exception that's being caught by run.ts. That's got to be a bit hint (to the Pulumi devs who know that code.. I know I don't know that code!).
f
that's a good call... maybe that could be a place to find things
also wonder if it has to do with ts-node
l
It might, since by default, Pulumi's wrapper uses ts-node to call your Pulumi project. Have you got anything strange in the runtime config in your Pulumi.yaml?
f
Copy code
runtime:
  name: nodejs
  options: 
    # See <https://github.com/TypeStrong/ts-node/issues/1007>
    nodeargs: "--loader ts-node/esm --no-warnings --experimental-specifier-resolution=node"
this is not a project i started, so i dont know for sure why those specific args are there
l
Those are required for ESM. If you're not using it, you can remove them. If you are using them and you remove them, then you will enter a World of Pain.
f
i am using ESM, and i think i was in that world of pain earlier haha
l
I've never seen a #-comment right there though... would you like to try removing it briefly to see if that changes anything? It probably won't, but no harm, eh?