Reputation: 69
I'm trying to create an android emulator for react-native, but I'm having some trouble installing some packages when I type in this command: choco install -y nodejs-lts openjdk11
You will find the above command at the following website: https://reactnative.dev/docs/environment-setup
nodejs-lts won't install for some reason. Do I have to uninstall nodejs and install nodejs-lts instead? Here is a screenshot of the error:
Upvotes: 5
Views: 7588
Reputation: 1
just open the power shell and run as administrator and the files will get installed
Upvotes: -1
Reputation: 1
check whether your system has C:\ProgramData, If not that means its hidden which is causing the system to throw the error, To fix- It is generally not recommended to alter some system files-nevertheless.First of all
open File Explorer options from Control Panel Then to View Tab. Uncheck "Hide protected Operating system files" and click on "Show hidden files and folders" Press Yes and then OK.
After this try to install it again and it'll work this time
Upvotes: -1