create react app on windows does not work - create-react-app

On windows, create-react-app command does not work after installing node (latest stable version).
also after trying to uninstall node and clear the npm cache.
below, a screen of the console when the process is blocked
screen console when create react app stops
I have no error message, nor any unlocking leads
Thanks for your help

Assuming you already have node installed,
run npm audit fix --force

Related

Watchman Version Showing 0.0.0. Preventing npm start on React Native App

I am trying to develop a react native application on MacOS, but I have been running into issues with installing watchman onto the machine. I have been running the command brew install watchman and whenever I enter the command watchman version the output displays version: 0.0.0. However, directly after running the first installation command over again, I see Warning: watchman 2022.06.06.00 is already installed and up-to-date which is really confusing me.
I have tried various different troubleshooting techniques such as uninstalling and reinstalling watchman, instead of using brew I attempted using sudo port install watchman with MacPorts, removing the .watchmanconfig file and re-creating it, and lastly restarting my device, but none of these solutions have seemed to work for me.
Whenever, I open my react native project and run the command npm start, this is the output that I see,
jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
...
watchmanResponse: {
error: 'std::__1::system_error: open: /Users/USER/Desktop/ReactNativeApp: Operation not permitted',
version: '0.0.0'
}
This error message ends the npm start and because of this, I am unable to run npm run ios and continue with the development of the application. If anyone happens to know of any fixes or has experienced this before I would appreciate it if you share how I can resolve it. Thank you.
We can resolved this when we put our project outside from those folder Desktop,Download and Document
then run
npm start
It will be work
thanks

NPM stuck on idealTree: timing idealTree

Today i decided to start react native cli project. Everything works great since i want to add new lib of course using npm . So i ran npm install ... . And this command always stuck on
Image
idealTree: timing idealTree Completed in 3440ms
And nothing happened. So i tried to ran
npm install --verbose
And again stuck on the same place. Also clear cache npm cache clear --force and nothing happened again. I don'n know how to fix this
I have had npm install freeze on me numerous times, lately. I'm not sure of the cause. When that happens I follow these steps:
Kill the npm install process with ctrl+c.
Delete node_modules. If there are files that you cannot delete because they are currently in use, that may mean that the npm install process was not successfully stopped. Try opening Task Manager and ending all nodejs and terminal processes. If this fails, restart your pc and then delete node_modules
Clean cache and reinstall node_modules with npm cache clean --force && npm i
This has happened to me a few times before and all I had to do was kill my dev server before running npm install.
Hope that helps as well!
I had the same issue on node latest version v18.8.0 and npm v8.18.0, I just downgraded to node 16.6 using nvm and it worked fine.
For me, the issue was that I had node running for a separate project. Terminating the other node process fixed the issue.
When i opened my package.json i saw '~2.2.1' in front of react-native-gesture-handler which probably means that it was notinstalled properly
Just close all terminals and then open task manager and kill all the processes corresponding to NodeJS. Then install it again.
Hopefully it will resolve.
I also faced this problem and the solution was simple by stopping all the "nodejs terminals" that are working outside.
When you stop nodeJS Terminals running in the background, it will complete the current installation process.
enter image description here
When you want to add package on your project it is better to stop server before adding new package.
I had same problem but after doing this it is solved.

Expo Web starts Automatically

When I run the command "yarn start", the expo web starts automatically, and even if I open the expo client app on my iPhone the link on my app takes me to Safari and opens up a webpage. How can I open the app on expo CLI and not on my phone's browser (Safari)?
I have also tried the command "expo start --ios" and when I run it I get the error
"Simulator not installed. Please visit
https://developer.apple.com/xcode/download/ to download Xcode and the
iOS simulator. If you already have the latest version of Xcode
installed, you may have to run the command sudo xcode-select -s /Applications/Xcode.app".
I don't want to run the app on a simulator or phone's browser instead on my phone using expo client
I was dealing with this issue also hoping someone would find a solution. However, I have found the solution that worked for me at least. What I did is installed the react-native cli (reinstall if already installed) and then ran npm install in my project and it went back to normal and stopped going on my phones browser. Search documentation regarding this to install those things. I installed them in the order stated and it worked.
try update your expo-cli version and see if it helps. npm install -g expo-cli
Below is my situation,
By default Expo uses yarn. I installed any new dependencies using npm, then by default expo is built with web.
Solution:
use yarn always to install new dependencies or
use npm install once to install and now expo will build project with android or ios
On Linux try with sudo:
sudo npm install -g expo-cli
Then install packages and run:
yarn
Then run the following to clear cache and start expo:
expo start -c
This issue usually happens when you install a new npm package. You can either uninstall/reinstall the package or run the above three steps and solve your problem.

Hot reloading with create-react-native app on vagrant

I have used create-react-native-app and expo to build an application on a vagrant ubuntu and run it using yarn start.
When i make changes to my file on my host machine, the changes are not
reflected.
With create-react-app, CHOKIDAR_USEPOLLING=true worked and all my
changes were reflected instantly but this is not the case for native.
Does anyone know how to get this to work?
Please try using yarn start instead of npm start since your current of npm (5) has issues with create-react-native-app as of today.

Which react-native version support all npms?

Whenever I update react -native , one or other npm show following messages (image):
It went after closing terminal
deleting node modules and installing everything successfully