'I am getting an error in my npm when trying to install expo-cli globally

When I try to install npm globally, using the command

npm install -g expo-cli

I am getting an error that says

npm install -g expo-cli
npm ERR! code ERR_OSSL_UNSUPPORTED
npm ERR! error:1E08010C:DECODER routines::unsupported

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-04-20T21_10_42_635Z-debug-0.log

Although I just updated my node version to version 17.9.0 and my npm version is 8.5.5.

What can I do to solve this problem?



Sources

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

Source: Stack Overflow

Solution Source