'Failed to install "expo-cli" using "npm install -g expo-cli" on Ubuntu 20.04LTS

Everytime i tried to install expo-cli on my ubuntu 20.04LTS it gives me this error and i already uninstall nodejs and npm and reinstalled it, but it keeps giving me this error everytime:

 npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
    npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
    npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
    npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
    npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
    npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
    npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
    npm WARN deprecated [email protected]: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
    
    added 1553 packages, and audited 1554 packages in 5m
    
    115 packages are looking for funding
      run `npm fund` for details
    
    33 vulnerabilities (12 moderate, 10 high, 11 critical)
    
    To address issues that do not require attention, run:
      npm audit fix
    
    To address all issues possible (including breaking changes), run:
      npm audit fix --force
    
    Some issues need review, and may require choosing
    a different dependency.
    
    Run `npm audit` for details.

Additional info: Node version: v12.22.11 npm version: 8.5.5



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source