Dependencies Documentations - bluecolab/BlueColab_MobileDataViz GitHub Wiki

Dependencies Documentations

All dependencies are found in the project's package.json.

Adding New Dependencies

  1. Make sure your terminal is in the aquawatch_mobile_app directory.
  2. To install dependencies run the following command:
    npx expo install <package-name>
    
  3. You may need to add the package to reactnativedirectorycheck's exclusion list. Learn more https://docs.expo.dev/versions/latest/config/package-json/#reactnativedirectorycheck.

[!NOTE] Using npx expo install <package-name> is preferable over npm install <package-name> because it ensures compatible versions of packages are installed.

Updating Dependencies

  1. Make sure your terminal is in the aquawatch_mobile_app directory.
  2. To update dependencies run the following command and follow prompts:
    npx expo install --check
    
  3. Alternatively individual packages can be updated via:
    npx expo install <package-name>
    

Removing Dependencies

  1. Verify you are not using the dependency. Note there are some expo dependencies that we d
  2. Make sure your terminal is in the aquawatch_mobile_app directory.
  3. To update expo run the following command:
    npm uninstall <package-name>
    

Fixing Weird Dependencies Issues

Getting funky errors with dependencies? Expect it to work but it doesn't? Start with:

  1. Make sure your terminal is in the aquawatch_mobile_app directory.
  2. Clear the bundler cache and start:
    npx expo start -c
    
3.  Remove the node_modules directory. Do it manually or via the command line:
  ```bash
  rm -rf node_modules
  ```
4. Reinstall dependencies:
 ```bash
 npm i
  1. Clear the bundler cache and start:
    npx expo start -c
    

Major Updates to Dependencies

At times Expo made have major version updates (i.e. 52->53). In that case:

  1. Make sure your terminal is in the aquawatch_mobile_app directory.
  2. To update Expo run the following command:
    npx expo install expo@latest
    
  3. Attempt to upgrade other dependencies to match new SDK with:
    npx expo install --check
    
  4. Read the SDK Changelogs for any notes or other instructions.

We want to keep updated with latest SDKs to (A) So we can continue to use Expo Go (B) Maintain compliance with latest Android Play Store Requirements