-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Labels
build/setupIssue is related to building Nitro Modules or autolinkingIssue is related to building Nitro Modules or autolinking
Description
How were you trying to build the app?
Hi, I'm facing the error "react-native-nitro-modules@npm:0.31.10 [0f065] couldn't be built successfully (exit code 1" when trying to add react-native-nitro-modules to my project.
This can be reproduced this way (react-native-nitro-modules 0.31.10, node 20, yarn 4.12.0, RN 0.82.1)
npx @react-native-community/cli@latest init testProject
yarn set version stable
yarn install
yarn add react-native-nitro-modules
Log:
➤ YN0000: · Yarn 4.12.0
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + react-native-nitro-modules@npm:0.31.10
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 255ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0007: │ react-native-nitro-modules@npm:0.31.10 [b5770] must be built because it never has been before or the last one failed
➤ YN0009: │ react-native-nitro-modules@npm:0.31.10 [b5770] couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/z4/9wpwt1lx00j84bl61p1cbd9m0000gn/T/xfs-b3c63eee/build.log)
➤ YN0000: └ Completed
➤ YN0000: · Failed with errors in 0s 560ms
And the build log:
# This file contains the result of Yarn building a package (react-native-nitro-modules@virtual:b57703281f341fb2616a33739e727e58b589792365df2f240ad9c27c04e86d7e13998c5efdff775d548f631b76125949409985b0122fcf737999ec428e46c5d9#npm:0.31.10)
# Script name: postinstall
Error: spawn ENOTDIR
at ChildProcess.spawn (node:internal/child_process:420:11)
at Object.spawn (node:child_process:762:9)
at dee (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:9:52804)
at t.implementation (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:158:1588)
at t.exec (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:164:1414)
at t.run (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:164:1585)
at Hpe (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:164:7428)
at async rit (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:166:16)
at async c (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:166:147)
at async nit (/Users/user/Documents/Sources/testProject/.yarn/releases/yarn-4.12.0.cjs:167:14)%
I feel I'm missing something...
Full build logs
No build logs as the issue occurs while adding the dependency to the project.Project dependencies
{
"name": "testProject",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native/new-app-screen": "0.82.1",
"react": "19.1.1",
"react-native": "0.82.1",
"react-native-nitro-modules": "^0.31.10",
"react-native-safe-area-context": "^5.5.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "20.0.0",
"@react-native-community/cli-platform-android": "20.0.0",
"@react-native-community/cli-platform-ios": "20.0.0",
"@react-native/babel-preset": "0.82.1",
"@react-native/eslint-config": "0.82.1",
"@react-native/metro-config": "0.82.1",
"@react-native/typescript-config": "0.82.1",
"@types/jest": "^29.5.13",
"@types/react": "^19.1.1",
"@types/react-test-renderer": "^19.1.0",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "19.1.1",
"typescript": "^5.8.3"
},
"engines": {
"node": ">=20"
},
"packageManager": "[email protected]"
}Nitro Modules Version
0.31.10
Nitrogen Version
No response
Target platforms
Android
Operating system
MacOS
Can you build the Nitro Modules Example app?
I didn't try (
Additional information
- I am using Expo
- I am using nitrogen
- I have read and followed the Troubleshooting Guide.
- I created a reproduction PR to reproduce this issue here in the nitro repo. (See Contributing for more information)
- I searched for similar issues in this repository and found none.
Metadata
Metadata
Assignees
Labels
build/setupIssue is related to building Nitro Modules or autolinkingIssue is related to building Nitro Modules or autolinking