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

fresh-spring-82225

05/19/2023, 9:06 PM
Can pulumi make use of node projects with “modern” (v2+) yarn?
WIth yarn 3.5.1, when I do
pulumi new
it fails with
Copy code
error: installing dependencies failed; rerun manually to try again, then run `pulumi up` to perform an initial deployment: npm install failed: yarn install reported success, but node_modules directory is missing
g

great-sunset-355

05/20/2023, 6:54 PM
yeah, the best I could achieve with pulumi so far was the use of
pnpm
over
yarn v1
w

worried-rain-74420

05/20/2023, 7:48 PM
Yeah, Yarn PnP is definitely not supported. You might be able to use Yarn Berry (v2+) without PnP. And, technically, PNPM isn't supported either. It seems to work for a lot of people, but we don't officially support it yet, so it may break without notice. However, my current project has recently been to lay the groundwork to add official support for pkg managers beyond NPM and Yarn Classic -- namely, PNPM, Yarn Berry, and NX. Just yesterday I opened a draft PR to use dynamic dispatch for pkg manager invocation instead of special-casing the differences between NPM and Yarn. I expect we'll add PNPM support before the end of the quarter, but I can't make any promises. 🙂
l

little-cartoon-10569

05/21/2023, 7:53 PM
I use Yarn2 without PnP, without any problems.
51 Views