From cd9c54d542f0efe6d40502dfe83b3f4bd482b451 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 24 Jun 2021 10:55:31 -0400 Subject: [PATCH] Document pnpm and Yarn usage (#531) * Document using Astro with pnpm * Document Yarn usage --- packages/astro/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/astro/README.md b/packages/astro/README.md index 6b82f0bfc..91e5e10e8 100644 --- a/packages/astro/README.md +++ b/packages/astro/README.md @@ -25,6 +25,18 @@ npm install npm start ``` +### pnpm + +If you are using [pnpm](https://pnpm.io/) add the following `.npmrc` to your root folder before installing: + +``` +shamefully-hoist = true +``` + +### Yarn + +[Yarn](https://yarnpkg.com/) works as a package manager in Astro apps. However, __Yarn 2__ changes how module resolution works in Node apps and doesn't support modules written in ESM at the moment. Since Astro is written entirely in ESM, you can't use Yarn 2 in Astro apps. We'll continue to track Yarn 2 as they fix these core bugs. + ### 🚀 Build & Deployment The default Astro project has the following `scripts` in the `/package.json` file: