cli icon indicating copy to clipboard operation
cli copied to clipboard

'MODULE_NOT_FOUND', @react-native-community/cli

Open yunyami0605 opened this issue 3 years ago • 11 comments

Ask your Question

I have a trouble with react-native-community/cli when command 'pod install' on ios folder

how to solve these problem?

[my react native project package version] "@react-native-community/cli": "6.1.0", "react": "17.0.2", "react-native": "0.66.0"

[version] xcode : 12.5.1 node: 16.11.0 cocoapods: 1.11.2

스크린샷 2021-10-28 오후 12 09 19

yunyami0605 avatar Oct 28 '21 03:10 yunyami0605

@yunyami0605 It might be caused by your project living under the directory name containing Hangul(?) characters. Maybe try moving to to somewhere only using ASCII characters in the parent directory names and see if that fixes the issue?

liamjones avatar Nov 01 '21 14:11 liamjones

I have the exact same issue and I'm using a directory that I've been using for months to develop on react native without issues. /Users/codydaig/dev/ioverlander/ioverlander-client-react

[version] xcode: Xcode 13.1. Build version 13A1030d node v14.18.0 pods: 1.11.2 Mac 11.6 (Intel)

codydaig avatar Dec 15 '21 14:12 codydaig

This works when I run it in terminal, but not in the terminal in VSCODE. (So annoying). It's consistently working in Terminal but not VScode.

codydaig avatar Dec 23 '21 14:12 codydaig

I started to get this error after upgrading from RN 0.66.4 to 0.67.2

kesha-antonov avatar Feb 07 '22 23:02 kesha-antonov

Sorry to answer late. i can solve this problem to install '@react-native-community/cli '

@react-native-community/cli => 6.1.0 react-native => 0.66.3

yunyami0605 avatar Feb 08 '22 08:02 yunyami0605

I solved it chaning like this in android/app/build.gradle

 project.ext.react = [
     enableHermes: true,  // clean and rebuild if changing
-    cliPath: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute().text.trim(), "../cli.js"),
+    cliPath: "../../node_modules/react-native/cli.js"
 ]

kesha-antonov avatar Feb 08 '22 09:02 kesha-antonov

still not work on mac m1 follow https://reactnative.dev/docs/integration-with-existing-apps

krmao avatar Aug 02 '22 02:08 krmao

This works when I run it in terminal, but not in the terminal in VSCODE. (So annoying). It's consistently working in Terminal but not VScode.

me too, Have you solved the problem yet?

lillian56 avatar Aug 20 '22 07:08 lillian56

@kesha-antonov cliPath is not found in

   "@react-native-community/cli" "^7.0.3"
    "@react-native-community/cli-platform-android" "^7.0.1"
    "@react-native-community/cli-platform-ios" "^7.0.1"

what is your version ?

please see (https://github.com/react-native-community/cli/issues/1600#issuecomment-1229240714)[https://github.com/react-native-community/cli/issues/1600#issuecomment-1229240714]

krmao avatar Aug 27 '22 18:08 krmao

@kesha-antonov cliPath is not found in


   "@react-native-community/cli" "^7.0.3"

    "@react-native-community/cli-platform-android" "^7.0.1"

    "@react-native-community/cli-platform-ios" "^7.0.1"

what is your version ?

please see (https://github.com/react-native-community/cli/issues/1600#issuecomment-1229240714)[https://github.com/react-native-community/cli/issues/1600#issuecomment-1229240714]

Sorry bro I'm on the higher rn version and everything works

kesha-antonov avatar Aug 27 '22 18:08 kesha-antonov

ok, we should be different problem, my android project is outter rn js project, latest code is same

krmao avatar Aug 28 '22 05:08 krmao

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.

github-actions[bot] avatar Nov 27 '22 03:11 github-actions[bot]