I'm new to react js, I have installed node js stable version. I have checked the node version and npm version it's working fine, I have tried to install react using "npm init react -app " & "npx create-react-app" but I'm getting an error I have tried all the suggestions (even I have uninstalled my anti-virus scanner) but it's not working. can anyone please help.
(Error screen shot "https://drive.google.com/file/d/17uWV6RX_e-ev-Afs5r4viqKTOL-SDsyY/view?usp=sharing")
1) Install node.js
2) Install npm by:
install npm –g
3) Create react app:
npx create-react-app test-app
Navigate to folder by:
cd test-app
Hope this will work.
Related
I'm trying to switch to react scaffolding from Bootstrap, but it's giving me errors about 'vue-template-compiler'. Below is my laravel, ui & nodejs version.
Laravel Version: 7,
Laravel UI: 2.4,
Node js: v16.15.1
These are the commands I've run:
composer create-project laravel/laravel:^7.0 MyApp
composer require laravel/ui:^2.4
php artisan ui react --auth
npm install && npm run dev
Here's my package.json
The Errors
Upon searching and reading a lot of articles I've finally found the answer, I've just installed it separately through npm.
npm install vue-template-compiler
This Fixed my problem.
I recently switched to Ubuntu, whenever I create react app it's giving me this note, and the app it's creating is a class component.
ankit#gram:~/Documents/Development/React/react-project$ npx create-react-app my-app
Creating a new React app in /home/ankit/Documents/Development/React/react-project/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
added 987 packages in 39s
22 packages are looking for funding
run `npm fund` for details
Success! Created my-app at /home/ankit/Documents/Development/React/react-project/my-app
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd my-app
npm start
Happy hacking!
Note: the project was bootstrapped with an old unsupported version of tools.
Please update to Node >=14 and npm >=6 to get supported tools in new projects.
my node version: v16.14.0
my npm version:8.3.1
I think this was because npx was not installed in my system, when I created a react app by this command create-react-app the app created was fine. I also installed npx using this command npm install -g npx and created a react app and everything was fine. before this make sure you have installed create-react-app in your system if not then install it by using this command
sudo npm install -g create-react-app
I am a new programmer had this issue not long ago I just solved it.
Use sudo apt install nodejs
It will automatically install version 10 for you which doesn't accept React.
Then you try to install NVM package, use it to update your node to a newer version.
You can check me on GitHub bari racha Wuye
I was having the same problem after I had just installed Ubuntu 22.04.
The fix for me was updating node and npm by following these instructions free code camp update node and npm
Specifically, I followed the instructions under the heading "1. Use NPM to Update Your Node Version", to update node and ignored the 2nd and 3rd headings, then followed the instructions under the last heading to update npm
afterwards I restarted my computer, opened the project directory and ran the command
npm i create-react-app#latest
then I ran
npx create-react-app projectname
and it worked as expected
I am trying to run react native expo, it installed (via 'npm install -g expo-cli') globally and I created Project ('expo init react-project') and works fine. But i wend inside folder and run npm start / expo start , appears Errors as shown in picture. I also get Error on 'expo'.
I also deleted node_modules Folder and reinstall it (npm install) but didn't help.
Like you can see in Images, I have latest node,npn and Git versions. And its strange that , although I have installed expo globally, i get expo version on E:\ but not in subfolder (detail in screenshots).
Could anybody help me out?
Error on expo:
Error on npm start / expo start:
Latest Versions:
I have been using React-Native for a project it's been more than a month, to create the app I uninstalled the react-native-cli and followed what is described in the official docs (https://reactnative.dev/docs/environment-setup). Yesterday, I modified an existing project (from github) and run :
npm install
npx react-native run-android
I had some errors so I updated npm, everything worked fine. I restarted my computer and tried to create a new app using the following command:
npx react-native init Test
This is the error that I get:
I uninstalled Node and installed the newest version (16.0.0) with npm version (7.11.2) and npx version (7.11.2).
Can someone please help me with this?
Uninstalling global packages
use this commond
npm uninstall -g react-native-cli
then restart computer and try create new app
I restarted my computer and tried to create a new app using the following command: npx react-native run-android Test
to create new app in react native use init not run-android
npx react-native init Test
i think you need to install react native cli but first Add npm path to your Environment variables; both system and user then install npm and react-native cli.
and if that does not work,Solution is to install react-native-cli globally You can install it globally by using the below command:
npm install -g react-native-cli
Everything working well but I don't know what happened, Now when I trying to hit Ionic Serve command it gives error and I have tried with different ionic version and node and npm version to fix the error but the issue remains same even I have tried to start from the fresh project but still no luck. I have attached the error page If anyone helps me it will be really grateful.
Versions that I have installed in my system -
Node = v10.15.3
Npm = 6.4.1
Ionic = CLI 4.12.0
Delete your node module folder which is inside your project then open your terminal and got to inside your project and use this following command "npm install --force" then "npm rebuild node-sass --force".