How to uninstall react-native-cli on mac? - react-native

How can I uninstall react-native-cli on Mac??
I tried npm uninstall react-native-cli and it gives me below.
npm WARN eslint-plugin-react#7.12.4 requires a peer of eslint#^3.0.0 || ^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native#3.6.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
I want to completely wipe-off my react native environment and re-install it. What should I do?

Uninstalling global packages
To uninstall an unscoped global package, on the command line, use the uninstall command with the -g flag. Include the scope if the package is scoped.
npm uninstall -g react-native-cli

If you need to completely remove react native environment you need to remove CLI
npm uninstall -g react-native-cli #react-native-community/cli
next, remove watchman
brew uninstall watchman
remove Android env:
How to completely uninstall Android Studio on Mac?
remove IOS env:
How to Completely Uninstall Xcode and Clear All Settings

Related

Could not resolve react-native peer dependency

I cloned a react native repository and I am getting the following errors when I perform npm install.
It seems like 2 packages have peer dependencies with the react-native package:
react-native-async-storage/async-storage#1.17.5
react-native-svg-icon#0.10.0
The package.json file has "react-native": "0.68.2", which seems to be compatible with what react-native-async-storage package needs (react-native#"^0.0.0-0 || 0.60 - 0.68 || 1000.0.0") and same with react-native-svg-icon#0.10.0 (react-native#"^0.64.0")
I tried --force and --legacy-peer-deps commands, some vulnerabilities are solved but same output for npm install.
Any suggestions?
When running npm install:
When running npm install --legacy-peer-deps:
When running npm install --force:
What eventually worked for me was to downgrade npm's version, in my case it was 8.3.1.

Can't install expo-cli

im trying to install expo-cli for react native project on ubuntu using npm i tried npm install -g expo-cli but it doesn't work for me always the same error :npm WARN deprecated request#2.88.2: request has been deprecated.
First try to clear cache:
npm cache verify
then,
npm install -g expo-cli
OR
Add expo through yarn instead of npm,
npm install -g yarn
then,
yarn global add expo-cli
and you are good to go.

how do i install tensorflow-node on Windows 10?

I have been running into problems with installing tensorflow-node on my Windows 10 desktop. What are the exact steps to install it?
make sure you have package.json file in your directory that at least looks like this:
{ "private": true }
make sure you have windows-build-tools installed globally:
npm install -g --production windows-build-tools
this should give you:
> + windows-build-tools#5.1.0
make sure you have node-gyp installed globally:
npm install -g node-gyp
install tensortflow-node locally:
npm install tensort-flow --save-dev
optionally (recommended) install gpu support for tensorflow
npm install #tensorflow/tfjs-node-gpu --save-dev
also check with the official installation instructions at: https://github.com/tensorflow/tfjs-node
also you might find helpful:
https://github.com/nodejs/node-gyp/issues/1463#issuecomment-396431904
https://github.com/nodejs/node-gyp/issues/702#issuecomment-280230515

Install npm package globally that has peer dependency (not mentioned in package.json)

I am trying to install marktext globally using npm (after cloning the repository):
npm install -g
npm WARN dagre-d3-renderer#0.5.8 requires a peer of d3#^4.13.0 but none is installed. You must install peer dependencies yourself.
How should I install, the peer dependency for the global package? Please give the command so that it is safe and prevents future conflicts.
I did npm install -g d3#^4.13.0 but I still get the same error.
Is this a good idea to install the dependency globally? Also, do I need to lock this at the version globally to prevent auto update when I do global update?
Try it with upgrading npm to version 7
npm install -g npm#7
npm 7 comes with new features. One of them is the automatically installing peer dependencies.
Automatically installing peer dependencies: prior to npm 7 developers needed to manage and install their own peer dependencies. The new peer dependency algorithm ensures that a validly matching peer dependency is found at or above the peer-dependent’s location in the node_modules tree.

Unable to link react-native-version-number

I am trying to install react-native-version-number. The instructions state that after installing, issue;
react-native link react-native-version-number
but when I do this, I get the following error message;
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
but when I run
npm uninstall -g react-native
I get
npm WARN uninstall not installed in /usr/local/lib/node_modules: "react-native"
How do I link react-native-version-number?
As a workaround, dv3's comment about using rnpm link did work. However, I found that I was having this problem with other react-native commands, such as react-native run-android. This appears to be because npm was installed using homebrew. A description of this problem and how to fix it can be found at on this gist. In summary the required fix is to uninstall all your npm globably installed packages, uninstall node, then reinstall node, and reinstall npm without brew.
npm list -g --depth=0 # to list all your globally installed packages
rm -rf /usr/local/lib/node_modules
brew uninstall node
brew install node --without-npm
echo prefix=~/.npm-packages >> ~/.npmrc
curl -L https://www.npmjs.com/install.sh | sh
and then, you have to reinstall all your npm packages that were installed globally.