You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
Hey, support for pnpm is something i have been working on for a while. I was able to make it work with init command and make project running on iOS and Android. However, since pnpm is using symlinks, I discovered a few pitfalls here.
node_modules structure is different. - there is a need of manual changing the paths in the following files in android and ios folders:
ios/Podfile - path to native_modules
android/app/build.gradle - path to native_modules.gradle
android/settings.gradle - path to native_modules.gradle
The pnpm paths are strongly dependent on installed versions of the dependencies, e.g. .pnpm/@react-native-community+cli-platform-android@9.3.1/node_modules/@react-native-community/cli-platform-android/native_modules.gradle
Developer needs to manually run pod install after initializing the project - CocoaPods installation fails due to incorrect native_modules path in Podfile mentioned in 1, but that step can be just skipped in init when using pnpm as package manager.
Another possible solution is creating a .npmrc file, adding node-linker: hoisted inside of it and running pnpm install, but i think it's missing the point of using pnpm as the node_modules structure will become similar to the one known from yarn and npm.
Where to go from there? I think adding all the required steps to make it work to the docs is one of the options, but definitely not the best one.
React and React Native versions:
"react": "18.2.0",
"react-native": "0.73.5",
It seems that every Gradle command is working fine through the command line. However, when I try to sync from Android Studio, the following error is displayed: 'Missing ExternalProject for:'
For us we had react native working with pnpm without hoisting. With new arch enabled. Then at one point of upgrading to newest RN, it stopped working with the error:
Missing ExternalProject for :
However, it works if using gradle from the command line.
Hi there, hope you're fine.
I'm struggling to run my development environment on iOS:
I'm getting the following error message: .../node_modules/.pnpm/react-native@0.80.2_@babel+core@7.28.3_@react-native-community+cli@19.1.1_typescript@5._3af7c2724a56ff00268a468b9be1dd98/node_modules/react-native/ReactCommon/jsinspector-modern/RuntimeAgentDelegate.h:10:10 'jsinspector-modern/cdp/CdpJson.h' file not found
But I noticed that the file existe, because when I click in the import reference It navigates to the file. I think this might be a module resolution.
Looks like you have some misconfigured package versions thus pnpm keeps both. Make sure you have one react native version. You can use “resolutions” field in package.jeon to force it.
Best, Mike
--
Mike Hernas
On 4 Oct 2025 at 10:26 +0200, Qazi Amaan ***@***.***>, wrote:
qazi9amaan left a comment (react-native-community/cli#1207)
Hey @JDScript@bimusiek — thanks for your earlier suggestions!
***@***.***/gradle-plugin").toPath().toRealPath().toAbsolutePath().toString())
However, I’m still running into an issue. The error now says:
Included build ***@***.******@***.******@***.***/gradle-plugin has build path :gradle-plugin which is the same as included build ***@***.***/gradle-plugin
Do you happen to know a workaround for this, or a cleaner way to resolve the duplicate gradle-plugin build path issue?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Works just fine, assuming the following tweaks made:
metro.config.js
const{ getDefaultConfig, mergeConfig }=require("@react-native/metro-config");constpath=require("path");/** * Metro configuration * https://reactnative.dev/docs/metro * Tweaks by @devBaunz * * @type {import('metro-config').MetroConfig} */constconfig={// This means we watch the entire repo (change path accordingly if needed)watchFolders: [path.join(__dirname,"..","..")],resolver: {nodeModulesPaths: [// PNPM installs symlink app's node_modules, not workspace onepath.resolve(__dirname,"node_modules"),],// This allows us to work with PNPMunstable_enablePackageExports: true,},// If you use react-native-reanimated, you might need this// transformer: {// getTransformOptions: async () => ({// transform: {// experimentalImportSupport: false,// inlineRequires: true,// },// }),// },};module.exports=mergeConfig(getDefaultConfig(__dirname),config);
settings.gradle (optional, if you want to use AndroidStudio directly), thanks to @bimusiek
Activity
github-actions commentedon Nov 27, 2022
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
thymikee commentedon Dec 5, 2022
Reopening, pnpm is something that we'd like to support
TMisiukiewicz commentedon Dec 21, 2022
Hey, support for pnpm is something i have been working on for a while. I was able to make it work with
initcommand and make project running on iOS and Android. However, since pnpm is using symlinks, I discovered a few pitfalls here.androidandiosfolders:ios/Podfile- path tonative_modulesandroid/app/build.gradle- path tonative_modules.gradleandroid/settings.gradle- path tonative_modules.gradleThe pnpm paths are strongly dependent on installed versions of the dependencies, e.g.
.pnpm/@react-native-community+cli-platform-android@9.3.1/node_modules/@react-native-community/cli-platform-android/native_modules.gradlepod installafter initializing the project - CocoaPods installation fails due to incorrectnative_modulespath inPodfilementioned in 1, but that step can be just skipped ininitwhen using pnpm as package manager.Another possible solution is creating a
.npmrcfile, addingnode-linker: hoistedinside of it and runningpnpm install, but i think it's missing the point of using pnpm as the node_modules structure will become similar to the one known from yarn and npm.Where to go from there? I think adding all the required steps to make it work to the docs is one of the options, but definitely not the best one.
rahulpandey commentedon Mar 10, 2024
Following steps working for me
Added public-hoist-pattern configuration in .npmrc to hoist packages from specific scopes:
.npmrc:
Also integrated the following changes in metro.config.js:
React and React Native versions:
"react": "18.2.0",
"react-native": "0.73.5",
It seems that every Gradle command is working fine through the command line. However, when I try to sync from Android Studio, the following error is displayed: 'Missing ExternalProject for:'
WarrenBuffering commentedon Jul 11, 2024
Are you saying these changes worked for you @rahulpandey? Or are you still getting the
Missing ExternalProject for:error?bimusiek commentedon Jul 17, 2024
For us we had react native working with pnpm without hoisting. With new arch enabled. Then at one point of upgrading to newest RN, it stopped working with the error:
However, it works if using gradle from the command line.
bimusiek commentedon Jul 17, 2024
Ok, I found the fix for React Native.
Instead of
you have to do
then it works in newest Android Studio.
JDScript commentedon Jul 17, 2024
You saved my day!!!!
shaquibimdad commentedon Aug 1, 2024
adding above deps to dev dependencies and then from @bimusiek solution for android studio
pnpm works smoothly no issues so far
GSFZamai commentedon Sep 12, 2025
Hi there, hope you're fine.
I'm struggling to run my development environment on iOS:
I'm getting the following error message:
.../node_modules/.pnpm/react-native@0.80.2_@babel+core@7.28.3_@react-native-community+cli@19.1.1_typescript@5._3af7c2724a56ff00268a468b9be1dd98/node_modules/react-native/ReactCommon/jsinspector-modern/RuntimeAgentDelegate.h:10:10 'jsinspector-modern/cdp/CdpJson.h' file not foundBut I noticed that the file existe, because when I click in the import reference It navigates to the file. I think this might be a module resolution.
I'm using:
On Android It's working fine until now
rmit-s3804879-sainathreddy-kodiganti commentedon Sep 17, 2025
Hey @GSFZamai ,
were you able to fix this?
GSFZamai commentedon Sep 17, 2025
Hey!
My decision atm was to change the package manager to
yarn.bimusiek commentedon Oct 4, 2025
devBaunz commentedon Nov 24, 2025
Works just fine, assuming the following tweaks made:
metro.config.js
settings.gradle (optional, if you want to use AndroidStudio directly), thanks to @bimusiek
babel.config.js (extra, if you want to use node functionality such as crypto/buffer) (make sure you have the packages as runtime dependancies)
Another nice change to make if you want a better pnpm experience in monorepo setup:
.npmrc (allows installing per directory with proper dep-management, mainly useful for ci/cd)