How to config EAS build use yarn or npm

Hi Expo,

When we build expo project with eas-cli.
Some projects use yarn, some use npm, and we don’t know why or how to config.
We have some issue with npm, just work only when we use npm i --legacy-peer-deps.
How to config to tell eas use yarn or add --legacy-peer-deps to npm ?

Thanks

hi there! eas build will use yarn if you have a yarn.lock file. if you use npm and want to use --legacy-peer-deps, you can set this in your .npmrc. you can create a .npmrc file in your project with the legacy-peer-deps option set or run npm config set legacy-peer-deps true in an eas-build-pre-install hook

2 Likes

Thanks brents

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.