Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown command 'start' #2557

Open
virajdoshi11 opened this issue Nov 26, 2024 · 4 comments
Open

Unknown command 'start' #2557

virajdoshi11 opened this issue Nov 26, 2024 · 4 comments

Comments

@virajdoshi11
Copy link

Environment

Debugger attached.
Debugger attached.
info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26100
  CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U
  Memory: 757.61 MB / 7.69 GB
Binaries:
  Node:
    version: 22.11.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.9.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-35 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-242.23339.11.2421.12550806
  Visual Studio: Not Found
Languages:
  Java: 17.0.13
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: latest
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: 0.76.2
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.76.3 is now available (your project is running on v0.76.2).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.76.3
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.2&to=0.76.3  
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".
Waiting for the debugger to disconnect...
Waiting for the debugger to disconnect...

Description

I am trying to make a bare react native project (without expo) and when I try to run my app with the command npm start or npx react-native run-android I get the error: unknown command 'start' or unknown command 'run-android'.

These are the things I have tried:

  1. Deleting the node_modules folder and re-installing
  2. Making a completely new project
  3. The code always warns about punycode depreciation so I tried to mitigate that
  4. Converting files into module type from the commonjs type
  5. Any other solution mentioned on stackoverflow

Reproducible Demo

You can just create a bare react native project but I think maybe its an issue with my environment or setting so you can download this repository:
https://github.com/virajdoshi11/Investigo

@ribamarsantos
Copy link

Same issue here. Would you know where the start command is for a bare react native project after upgrade to RN 0.76.3?

@liamjones
Copy link
Contributor

The start command should be coming from package @react-native/community-cli-plugin or @react-native-community/cli-plugin-metro. Sorry, I don't know off hand which version RN 0.76 uses.

@ribamarsantos
Copy link

I got it working after @liamjones shared about this dependency. I went to check and did some debug. After yarn cache clean I did removed the yarn.lock file and run yarn again. It worked. @virajdoshi11 . I also just updated to 0.76.4

@virajdoshi11
Copy link
Author

Hi @ribamarsantos & @liamjones , I tried your solution but still not working out for me. It actually doesn't recognize any commands including start and run-android.

Although, after deleting the package-lock.json and running npm install I do see a few errors in the react-native node module. Inside the module in the gradle-plugin folder and all the folders inside it have the error: "Missing Gradle project configuration folder: .settings".

Also when I try any command, I don't know why it first outputs Debugger attached then disconnects and again attaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants