https://pulumi.com logo
s

shy-finland-77998

12/22/2018, 8:34 PM
It doesn’t appear pulumi is recognizing a custom tsconfig.json file and I’m getting errors such as
error TS2304: Cannot find name 'APIEndpoint'
For context, APIEndpoint is an interface type in a folder in the project When I run the project outside of pulumi (using
ts watch
, etc.) these types get picked up and there’s no issue. So best I can tell when running pulumi, it doesn’t know about these files for whatever reason. I’m troubleshooting it now but any advice in the meantime?
w

white-balloon-205

12/22/2018, 8:38 PM
Have you imported the file where
APIEndpoint
is defined into your entry point (
index.ts
)? You shouldn’t have to, but you may also try listing any additional files in the
files
section of ts config.json.
s

shy-finland-77998

12/22/2018, 8:39 PM
i didn’t import it because my assumption is I shouldn’t have to. BUT I will do it just to capture the result…see what happens.
w

white-balloon-205

12/22/2018, 8:40 PM
For Node.js in general, you need to import modules for them to get loaded.
s

shy-finland-77998

12/22/2018, 8:41 PM
yeh but for TS stuff liek interfaces and such, if they’re in a separate file…they still get picked up by the TS compiler. Which they are if I run the compiler by itself using my config.
ok. well. that does fix that particular problem when running
pulumi
so that works. 👍
w

white-balloon-205

12/22/2018, 8:45 PM
That’s true. For the auto-TypeScript support we use tsnode, which compiles files as it loads. Great that that works for you.