create-react-app not working for me and i tried everything on stackoverflow - create-react-app

I using create-react-app, and I get this :create-react-app
even I tried npx and it is not worked npx create-react-app
then I tried npm cache clear --force and npm install I get this
npm cache clear
And nothing worked for me.

Related

I can not open a spesific vue project on Control panel either VS code

i try to open a vue project already exist but i can't do this. I already try npm commands like npm install, npm run serve, npm build, but still doesn't work. Can you help me?
This is error screen on terminal.
npm install
npm install --force
npm run serve
//still doesn't work

Facing code EWORKSPACESCONFIG issue while npm install

Below error, I am getting while doing npm install for react-native.
npm ERR! code EWORKSPACESCONFIG
npm ERR! workspaces config expects an Array
Didnt work for me too so I used yarn instead of npm and that worked
The root cause of this error is npm version. I tried many things but none of them worked.
Try to upgrade or downgrade npm version. Will fix this issue.
I erased the workspaces entry and used npm i --force #tailwindcss/typography and it seemed to solve it.

fail to login to npm 'npm errno: -4048'

I'm struggling with this issue for a while.
currently, I'm using nvm. npm version 5.0.0
I've tried to:
install npm version lower than 5.3.
remove node and npm completely and reinstall it
delete all files that connected to npm and reinstall everything back.
delete .npmrc file and recreate
npm clean cache --force
npm config get registry - https://registry.npmjs.org/
running the command from administrator
The login details are correct.
Don't know what else I can do, I will appreciate any advice
Thanks

Running `npm ci` returns `pkg-dir not accessible from find-cache-dir`

I'm trying to run this command:
npm ci
And it returns this error:
npm ERR! pkg-dir not accessible from find-cache-dir
What am I missing here?
So it turned out that my package-lock.json file was out of sync with package.json. I ran npm i, which regenerated an in-sync version of package-lock.json, which I eventually used in other environments to successfully run npm ci command.
Just running npm i again didn't fix the issue for me. Deleting my existing package-lock.json and my node_modules folder, then running npm i generated an updated package-lock.json file. Afterwards, npm ci worked.
Problem is with compatibility between versions of Node and NPM, in my case upgrading NPM to 8.5.5 and Node to 18.12.1 worked

Uninstalling Expo CLI

I have installed Expo CLI globally and cant start a new react native app without using expo cli and therefore would like to uninstall it from my system. I have spent hours trying to work out how to removeit globally from my system
To completely uninstall expo cli
On Windows
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd %USERPROFILE% && rmdir /Q /S .expo
On Mac OS Catalina
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd ~ && rm -rf .expo
Thanks to #Александр Наумкин and #Liko for editing and comments
npm -g uninstall expo-cli --save did not work for me, but yarn global remove expo-cli did.
I expected the npm option to work, and was surprised when it didn't. I am using nvm, and wonder if this answer explains why the npm option didn't work for me.
I had the same problem and after searching I found this command:
npm -g uninstall expo-cli --save
finally expo-cli is deleted from my pc but it still asks about it every time I type create-react-native-app. if anybody knows how to go on from here be my guest.
and I hope this helps you
edit: if you use react-native init it is almost the same as create-react-native-app without expo-cli. This is how I chose to carry on as using the create command with expo-cli gives the application error after error if you install any api.
if you are using npm then this command will work for uninstalling expo cli
npm -g uninstall expo-cli --save
I had the same problem once, i have tried
npm -g uninstall expo-cli
but after the my problem didn't get solved, i have searched lot even after that problem did't get solved,
i am also using yarn so finally i have decided to remove using the yarn
i tried
yarn global remove expo-cli
This indeed solved my issue
If you are using nvm.
search for node version with expo installed.
find ~/.nvm -name "*expo*" -type d
nvm use {nodeversion}
npm -g uninstall expo-cli
If yarn don't work for you or you prefer using npm use:
npm rm -g expo cli
Very simple to uninstall a npm package.
Just enter this command :
npm uninstall -g expo-cli
In Windows 10 npm uninstall -g expo-cli --save worked for me from nodejs console, opening it as administrator
In windows 10 to uninstall :
npm uninstall -g expo-cli --save
yarn remove global expo-cli
Worked for me.
After that, for install last version then:
npm install -g expo-cli --save
expo-cli --version
3.21.13
I had this issue.
My steps
npm cache clean --force
npx install create-react-native-app
cd
npm install -g expo-cli
expo start
If you get error at 4 about node.js just install latest version. Then
Open your package.json file and add:
"react-navigation": "git://github.com/Snailapp/react-navigation.git#2.18.5"
npm install
Ok, in addition to existing answers, with commands like npm -g uninstall expo-cli and deleting manually .expo folder inside %USER% i try expo whoami, and my output was:
$ expo whoami
There is a new version of expo-cli available (4.13.0).
You are currently using expo-cli 3.23.3
Install expo-cli globally using the package manager of your choice;
for example: npm install -g expo-cli to get the latest version
[13:13:03] › Not logged in, run expo login to authenticate
So i had to do a bit more manual work:
%USER%\AppData\local and deleted expo folder
went to %USER%\AppData\Roaming\npm folder and manually deleted expo related files
After that i did expo whoami and output is:
$ expo whoami
bash: /c/Users/User/AppData/Roaming/npm/expo: No such file or directory
Finally, i opened new command prompt and did npm i --g expo-cli and after installation with expo -V i get 4.13.0.
I had the same issue
i unistalled using
npm uninstall expo-cli
or
npm unistall -g expo-cli