From 675a8623e6349c6cffac58dcfa55f273890197bc Mon Sep 17 00:00:00 2001 From: Raajesh Date: Sat, 26 Oct 2024 17:22:15 +0530 Subject: [PATCH] Update FAQ.md Shamefully-hoist when running `pnpm install` to solve unable to find packages in node_modules issue --- FAQ.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 06ebe6c..1baa246 100644 --- a/FAQ.md +++ b/FAQ.md @@ -518,7 +518,7 @@ node-linker=hoisted ``` Pnpm is not included in the Amplify default build container. If you are using PNPM as your package manager, you must add a command to install pnpm in the preBuild phase of your app's build settings. -The following example excerpt from a build specification shows a preBuild phase with a command to install pnpm: +The following example excerpt from a build specification shows a preBuild phase with a command to install pnpm and monorepo's pnpm install: ``` version: 1 @@ -528,6 +528,7 @@ applications: preBuild: commands: - npm install -g pnpm + - pnpm install --shamefully-hoist # Amplify requires hoisted dependencies to be in the root of the node_modules ``` We also introduced the new `buildPath` attribute in the buildSpec. If you want to build your application under the project root folder, you can set buildPath to `/`. Note that the baseDirectory is the relative path of buildPath (if specified).