When creating an react native app with expo, expo installs many module that i don't need. Is there a way to remove these unwanted modules like barcode reader google sign in and google maps. thanks
3 Answers
To remove a package from your node_modules
directory, on the command line, use the uninstall command. Include the scope of the package is scoped.
Unscoped package
npm uninstall --save <package_name>
Scoped package
npm uninstall --save <@scope/package_name>
if need to know more about it then follow official Document here https://docs.npmjs.com/uninstalling-packages-and-dependencies#removing-a-local-package-from-the-packagejson-dependencies
-
4It is really strange but command "npm uninstall package-name" doesn't delete packege from folder and doesn't delete it from package.json.– KateCommented Jun 12, 2021 at 16:52
npm uninstall <package name>
works. It removes the expo module from your node_modules
for more reference https://docs.npmjs.com/uninstalling-packages-and-dependencies
-
1
With NPM
$ npm uninstall jest
Shorthand version
$ npm r jest
With Yarn
$ yarn remove jest
-
1I tried this after
expo install expo-camera
, but then if I wanted to install another module I getPluginError: Failed to resolve plugin for module "expo-camera" relative to ...
I had to go toapp.json
(in project root) and remove"expo-camera"
from the "plugins" array– jave.webCommented Feb 2, 2022 at 20:11
npm uninstall
oryarn remove
check out @akshay-i 's answer, but be careful if you are using OTA docs.expo.io/versions/latest/expokit/…