简体   繁体   English

React Native 项目无法运行

[英]React Native Project not able to run

I am new in React Native and trying to run the project for the first time.我是React Native 的新手,第一次尝试运行该项目。 Whenever I try to run it it shows the error at the cmd console as每当我尝试运行它时,它都会在 cmd 控制台显示错误

这是显示此错误

I also tried uninstalling the previous version of node and installed it again and it still shows the same problem.我也尝试卸载以前版本的节点并重新安装它,它仍然显示相同的问题。 checked out some of the solutions and didn't work.检查了一些解决方案,但没有奏效。

I'm using node and npm as in the following image.我正在使用 node 和 npm,如下图所示。

在此处输入图片说明

try installing you node_modules after removing the old ones: I suggest doing these three steps:删除旧模块后尝试安装 node_modules:我建议执行以下三个步骤:

1- npm install -g npm@latest to update npm because it is sometimes buggy. 1- npm install -g npm@latest更新 npm 因为它有时有问题。

2- rm -rf node_modules/ to remove the existing modules. 2- rm -rf node_modules/删除现有模块。

3- npm install to re-install the project dependencies. 3- npm install重新安装项目依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM