I read this article: Why You Should Use "npx expo install" instead of "npm install" in Expo React Native App.
Basically, the recommendation is to use npx expo install
when possible. However, I couldn't figure out what the reverse command is for npx expo install some-package
. And it's not npx expo uninstall some-package
So far, I have tried the help command:
$ npx expo install --help
Info
Install a module or other package to a project
Usage
$ npx expo install
Options
--check Check which installed packages need to be updated
--dev Save the dependencies as devDependencies
--fix Automatically update any invalid package versions
--npm Use npm to install dependencies. Default when package-lock.json exists
--yarn Use Yarn to install dependencies. Default when yarn.lock exists
--bun Use bun to install dependencies. Default when bun.lock or bun.lockb exists
--pnpm Use pnpm to install dependencies. Default when pnpm-lock.yaml exists
-h, --help Usage info
Additional options can be passed to the underlying install command by using --
$ npx expo install react -- --verbose
> yarn add react --verbose
I also tried:
$ npx expo --help
Usage
$ npx expo <command>
Commands
start, export
run:ios, run:android, prebuild
install, customize, config, serve
login, logout, whoami, register
Options
--version, -v Version number
--help, -h Usage info
For more info run a command with the --help flag
$ npx expo start --help
And there is no mentions about npx expo uninstall
However, I found no mention of a command like npx expo uninstall some-package
.
Can anyone assist me with reverting the installation of a package using Expo? What methods do others use to accomplish this? Should I simply run npm remove some-package
, or would it be better to use git revert
?
I read this article: Why You Should Use "npx expo install" instead of "npm install" in Expo React Native App.
Basically, the recommendation is to use npx expo install
when possible. However, I couldn't figure out what the reverse command is for npx expo install some-package
. And it's not npx expo uninstall some-package
So far, I have tried the help command:
$ npx expo install --help
Info
Install a module or other package to a project
Usage
$ npx expo install
Options
--check Check which installed packages need to be updated
--dev Save the dependencies as devDependencies
--fix Automatically update any invalid package versions
--npm Use npm to install dependencies. Default when package-lock.json exists
--yarn Use Yarn to install dependencies. Default when yarn.lock exists
--bun Use bun to install dependencies. Default when bun.lock or bun.lockb exists
--pnpm Use pnpm to install dependencies. Default when pnpm-lock.yaml exists
-h, --help Usage info
Additional options can be passed to the underlying install command by using --
$ npx expo install react -- --verbose
> yarn add react --verbose
I also tried:
$ npx expo --help
Usage
$ npx expo <command>
Commands
start, export
run:ios, run:android, prebuild
install, customize, config, serve
login, logout, whoami, register
Options
--version, -v Version number
--help, -h Usage info
For more info run a command with the --help flag
$ npx expo start --help
And there is no mentions about npx expo uninstall
However, I found no mention of a command like npx expo uninstall some-package
.
Can anyone assist me with reverting the installation of a package using Expo? What methods do others use to accomplish this? Should I simply run npm remove some-package
, or would it be better to use git revert
?
1 Answer
Reset to default 1The command
npx expo install some-package
finds compatible version of some-package with your expo version. Under the hood it runs:
npm install some-package@version
Therefore just use
npm uninstall some-package