Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
157 views
in Technique[技术] by (71.8m points)

android - React Native not recognizing 'start' command (can't start the project)

Setup:
? Windows;
? Android Studio;
? VSCode;
? Bash (terminal);

Problem:
Can't start the project after it was closed using command 'react-native start';

Details:
I created and started a project using these commands:

$ react-native init ProjectName
$ react-native run-android

(after init) I got android studio working with the RN project (by opening '../project/android' folder) and Android Virtual Device was normally working and showing the actual project 'Welcome Page'.

(reopening the project) By now, I'm trying to 'start' the project from where it stopped, but I'm stucked with a command line problem:

$ react-native start
error Unrecognized command "start".
info Run "react-native --help" to see a list of all available commands.


If I use other command, it recognizes the command.

$ react-native --version
4.13.1

$ react-native init
error: missing required argument `projectName'

What I've tried?
Install react-native-cli globally;
npx for commands;

question from:https://stackoverflow.com/questions/65940107/react-native-not-recognizing-start-command-cant-start-the-project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Welp, I got the solution (very noob), I use terminal inside VSCode, by opening it using 'new terminal', the terminal was opening one level above the actual package files, so obviously It would never recognizes commands because It was never finding the project files.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...