Is there a way to have Pulumi use Yarn out the gat...
# typescript
p
Is there a way to have Pulumi use Yarn out the gate rather than have it boot strap an initial project with NPM? I dont like having to clean out the npm stuff when I switch to Yarn.
b
you can always create your
Pulumi.yaml
yourself and then manually create the project using yarn
p
like in the project folder before running pulumi init?
b
yeah, all
pulumi new
does is download the template from here: https://github.com/pulumi/templates and then
npm install
to grab your deps
p
ah ok thanks for the help!
v
I think you can set
PULUMI_PREFER_YARN=true
in your
.bashrc
/
.zshrc
whichever you use
export PULUMI_PREFER_YARN=true
p
ty ty, I wonder if I can do the same with powershell
v
$env:PULUMI_PREFER_YARN = true
I believe
try that?
or might be
True
- been a while since I used powershell 😄
p
Yeah, that's what I was gonna try. I'll add that to my $PROFILE for the next project
v
👍 awesome, hope that solves it for you
p
I have a bunch of customer functions for setting azure backends and stuff already in there, so I'll just put in with the other pulumi settings
v
yeah thats what we do, we set our backends, region etc with functions and just set prefer yarn to true
p
speaking of which, is there a Pulumi doc on all the env vars? Ive been looking for it
nvm I found it 🙂
m
just be aware pulumi has difficulty w/ function serialization w/ plug and play package managers. yarn 2 ("berry") and pnpm both have this problem
i think this is a known issue
p
Thats helpful thanks