安装问题-nodejs -lts(已退出1603) - 运行时出错:
我正在尝试为React-Native创建一个Android模拟器,但是当我输入此命令时,我在安装一些软件包时遇到了一些麻烦:choco install -y nodejs-lts openjdk11
您会发现上面的命令在以下网站上: https://reactnative.dev/docs/envoriranment-setup
nodejs nodejs -lts不会出于某种原因安装。我是否必须卸载nodejs并安装nodejs-lts?这是错误的屏幕截图:
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:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
手动卸载nodejs,然后再次运行命令。
source
Uninstall NodeJS manually and then run the command again.
source
检查您的系统是否具有C:\ programData,
如果不是那样,则意味着导致系统丢弃错误的隐藏,
修复 -
通常不建议更改某些系统文件 - 无用
。
然后查看选项卡。
取消选中“隐藏受保护的操作系统文件”,然后单击“显示隐藏的文件和文件夹”
按是,然后确定。
此后,尝试再次安装它,这次将起作用
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
只需打开电源外壳并作为管理员运行,文件将安装
just open the power shell and run as administrator and the files will get installed