Let me clarify the issue: I am trying to start react native app through expo cli. So tried to start npm install expo-cli --global to install npm globally.that's what I get after running the command I got these errors:
Related
I write in terminal npm start and after that I choose to run in web version. And i get this error
I tried to fix this problem like that "npm install react-native-web" But it didn't work
It looks like you're trying to use web support but don't have the required dependencies installed.
Please install react-native-web#~0.18.7, react-dom#18.0.0,
#expo/webpack-config#^0.17.0 by running:
npx expo install react-native-web#~0.18.7 react-dom#18.0.0
#expo/webpack-config#^0.17.0
If you're not using web, please ensure you remove the "web" string
from the platforms array in the project Expo config.
try this command: expo start --web
Installing both with legacy peer deps worked for me
npm i react-native-web --legacy-peer-deps
npm i react-dom --legacy-peer-deps
Install using this command:
Open Visual Studio Code terminal in the folder to install
npx expo install react-native-web#~0.18.7
npm install #expo/webpack-config#^0.17.0
npm install react-dom#18.0
Run this app with npm start
I'm trying to start a React Native application, But when I try to install the Expo CLI running any of the commands below, it returns this error:
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Amro\AppData\Local\npm-cache_logs\2022-07-21T18_29_03_950Z-debug-0.log
Commands tried:
"npm install expo-cli --global"
"npm install --global expo-cli"
"npm install expo-cli --location=global"
If anybody has any suggestion on how to install the Expo CLI, I would very much appreciate it, thanks.
Have you tried installing without the global tag?
npm install expo-cli
I started a blank project and this worked fine.
Triple check you are in the correct file location when running the command. If you are new to expo/npm/etc, double check you are using correct versions of Node.js and Npm, as well as having correctly set up environment variables. Please reply to this comment if this doesn't work and you have further questions.
As of Expo v46 the CLI is part of the local expo package. There is no need to install the global package.
Use npx expo start to start your app.
npx will look in the node_modules of your current directory first, and because the expo package includes the expo-cli bin it will be invoked.
This makes maintaining older apps MUCH easier.
Details in the blog post.
The New Expo CLI
I ran create-react-app and get this error message I did the followings like uninstalling global and so no but getting the same again and again.
You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1).
We no longer support global installation of Create React App.
Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app
The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/
npm ERR! code 1
npm ERR! path J:\Akhlak_hossain_jim
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c ""create-react-app" "ahj-app" "--use-npm""
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Akhlak Hossain Jim\AppData\Local\npm-cache\_logs\2020-11-24T15_16_27_423Z-debug.log
Edit:
I've also tried the following:
Using npx instead. - but that's not working and is showing the above error message.
Uninstalled create-react-app using npm uninstall -g create-react-app before running npx create-react-app ahj-app - however that also doesn't work.
npm install -g create-react-app
Above worked for me.
Do not use npm to install "create-react-app" instead use npx this way:
npx create-react-app my-app
it will always use the lastest version
I solved this using the following command.
npm uninstall -g create-react-app
then again install
npm install -g create-react-app
PS D:\ReactProjects> npx create-react-app sample-app
Creating a new React app in D:\ReactProjects\sample-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npx create-react-app#5.0.0 ahj-app
Specify the latest version explicitly when creating new app
Hi thanks for reading this topic
I work with react I nowadays trying to learn ReactJS when install react new app show an error for uninstall react new project
what is my problem
in Command Terminal
npm ERR! Unexpected end of JSON input while parsing near
'...9.1","tslint-config
-p'
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\john\AppData\Roaming\npm-cache_logs\2019-12-26T01_36_25_1
39Z-debug.log npm install --save #testing-library/react#^9.3.2
#testing-library/jest-dom#^4.2 .4 #testing-library/user-event#^7.1.2
failed
I think it's version problem.
If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app to ensure that npx always uses the latest version
Quick Start
npx create-react-app my-app
cd my-app
npm start
For more clarification check this reactjs
I faced the same problem quite a few times.
Then used following commands, it worked for me
npm init
npm cache clean force
npx create-react-app my-app
cd my-app
npm start
I am unable to install react js using NPM. I am getting following error.
Your environment has been set up for using Node.js 12.3.1 (ia32) and npm.
C:\Users\User>npm install create-react-app -g
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/create-react-app failed, reason:
unable to verify the first certificate
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2019-12-14T05_54_58_7
16Z-debug.log
I am form India and I am not using any corporate firewall or VPN.
hey can you try using npx create-react-app ${your project name}
I ran the following command in the command line and worked for me:
npm config set strict-ssl false
Although it's not a great idea.
run this command to turn it on again:
npm config set strict-ssl true
Download Node.js archive
Download latest version of Node.js installable archive file from Node.js Downloads.
After successfully installing NodeJS, we can start installing React upon it using npm. You can install ReactJS in two ways.
- Using webpack and babel.
- Using the create-react-app command.
But I am telling you about Using the create-react-app command:
- Instead of using webpack and babel you can install ReactJS more simply by installing create-react-app.
Browse through the desktop and install the Create React App using command prompt as shown below:
Step 1: go to your specific directory and run below commands inside the folder like as below:
Step 2: d:\reactproject\>npx create-react-app my-app
Step 3: cd my-app
Step 4: npm start
Check if your date is right.
If it's not run this and try again:
sudo date --set="2015-09-30 10:05:59.990"