https://pulumi.com logo
#typescript
Title
# typescript
s

salmon-account-74572

06/16/2020, 10:17 PM
Newbie question here: what would folks recommend to help keep from littering my hard drive with multiple 200MB
node_modules
directories?
l

little-cartoon-10569

06/16/2020, 11:10 PM
Yarn workspaces. Or you can do the same thing yourself by having multiple projects in their own directories under a single set of tsconfig.json and package.json.
👍 1
Depending on what you're doing with containers and so forth, you may need a top-level index.ts that imports the project you're working on. And there's a known issue with this setup when using inline code as your AWS lambda or similar. You may need to symbolic link your node_modules and package.json until that's sorted. Onesec I'll get the issue link.
There's a comment in there that shows the directory structure you need. Just remove
yarn.lock
from the picture and it should work for you.
s

salmon-account-74572

06/22/2020, 4:06 PM
Thanks! I'm using the "multiple projects under a single directory" approach now, which works, but something more flexible would be great. I'll look into Yarn workspaces, thanks!