ReactVision / starter-kit

React Native project setup with Viro 🚀
MIT License
127 stars 90 forks source link

Error: Cannot find module 'signal-exit' #29

Closed weex closed 2 years ago

weex commented 2 years ago

Setting this up on Mac OS X Big Sur 11.6.1 with node version v16.13.0 and ran the commands in the readme until this one failed. Installed signal-exit with npm install -g signal-exit but that didn't help.

$ npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
error Failed to run jetifier.
Error: Cannot find module 'signal-exit'
Require stack:
- /Users/dsterry/code/viro-starter/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js
- /Users/dsterry/code/viro-starter/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js
- /Users/dsterry/code/viro-starter/node_modules/@react-native-community/cli-platform-android/build/commands/index.js
- /Users/dsterry/code/viro-starter/node_modules/@react-native-community/cli-platform-android/build/index.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/react-native.config.js
- /Users/dsterry/code/viro-starter/node_modules/cosmiconfig/node_modules/import-fresh/index.js
- /Users/dsterry/code/viro-starter/node_modules/cosmiconfig/dist/loaders.js
- /Users/dsterry/code/viro-starter/node_modules/cosmiconfig/dist/createExplorer.js
- /Users/dsterry/code/viro-starter/node_modules/cosmiconfig/dist/index.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/readConfigFromDisk.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/node_modules/@react-native-community/cli/build/tools/config/index.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/install/install.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/index.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js
- /Users/dsterry/code/viro-starter/node_modules/react-native/cli.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/Users/dsterry/code/viro-starter/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:10:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
info Run CLI with --verbose flag for more details.
robertjcolley commented 2 years ago

can you add the output of npx react-native info to the issue?

weex commented 2 years ago

See a few Not Founds below. I don't do mobile dev usually so that might be why I'm missing something.

 $ npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 11.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 45.94 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.2 - /Users/dsterry/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.1 => 0.65.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
robertjcolley commented 2 years ago

I notice you don't have the android SDK installed correctly, or at all. Try following: https://reactnative.dev/docs/environment-setup completely, and then try running android again! This repo assumes you have react native set up. I can add a note about that to the README.

After you do the react native setup, let me know if you're still having the issue and I can help further :)

robertjcolley commented 2 years ago

Just updated the readme with prerequisites of adding react native here b5762bad50f8ac166bb4bd624fc58fd3e4b47097

weex commented 2 years ago

Ok, I installed react-native and Android Studio and got much further. App is crashing now so created a new issue.