Repository navigation
Closed
Labels
Description
Environment
Run react-native info returns same error:
npx react-native info
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './xcode'
Require stack:
Description
pod install:
Error: Cannot find module './xcode'
Require stack:
- /Users/user/myapp/node_modules/@react-native-community/cli-doctor/build/tools/healthchecks/index.js
The basic init doesn't finish installing. I've tried with a number of version of react-native, and none work. It was working last week when I installed a sample app.
npx react-native@0.71.3 init beatsperminute --version 0.71.3
I can in fact see that ./xcode is not in the build dir:
▾ [ ]�cli-doctor/
▾ [ ]�build/
▸ [ ]�commands/
▾ [ ]�tools/
▾ [ ]�healthchecks/
[ ]�androidHomeEnvVariable.d.ts
[ ]�androidHomeEnvVariable.d.ts.map
[ ]�androidHomeEnvVariable.js
[ ]�androidHomeEnvVariable.js.map
[ ]�androidNDK.d.ts
[ ]�androidNDK.d.ts.map
[ ]�androidNDK.js
[ ]�androidNDK.js.map
[ ]�androidSDK.d.ts
[ ]�androidSDK.d.ts.map
[ ]�androidSDK.js
[ ]�androidSDK.js.map
[ ]�androidStudio.d.ts
[ ]�androidStudio.d.ts.map
[ ]�androidStudio.js
[ ]�androidStudio.js.map
[ ]�cocoaPods.d.ts
[ ]�cocoaPods.d.ts.map
[ ]�cocoaPods.js
[ ]�cocoaPods.js.map
[ ]�common.d.ts
[ ]�common.d.ts.map
[ ]�common.js
[ ]�common.js.map
[ ]�index.d.ts
[ ]�index.d.ts.map
[ ]�index.js
[ ]�index.js.map
[ ]�iosDeploy.d.ts
[ ]�iosDeploy.d.ts.map
[ ]�iosDeploy.js
[ ]�iosDeploy.js.map
[ ]�jdk.d.ts
[ ]�jdk.d.ts.map
[ ]�jdk.js
[ ]�jdk.js.map
[ ]�nodeJS.d.ts
[ ]�nodeJS.d.ts.map
[ ]�nodeJS.js
[ ]�nodeJS.js.map
[ ]�packageManagers.d.ts
[ ]�packageManagers.d.ts.map
[ ]�packageManagers.js
[ ]�packageManagers.js.map
[ ]�watchman.d.ts
[ ]�watchman.d.ts.map
[ ]�watchman.js
[ ]�watchman.js.map
Activity
benlieb commentedon Apr 15, 2023
Hm, re-installing with
npmthis time (notyarn) the files are there.benlieb commentedon Apr 15, 2023
So confused by this. I had to use
init --npmto get this to work.Don't understand why installing with
npmwould be different fromyarn, but it is the case.adamTrz commentedon May 11, 2023
Glad it worked!
We're working on solution to bypass this weird behaviour of
yarnandnpx, for now adding--npmshould work tho