react native遇到这个问题,npm install之后再运行也是报错

react native遇到这个问题,,下载了个扫码的项目,,但是使用了npm install之后再运行也是报错,,Command run-android unrecognized. Make sure that you have run npm install and that you are inside a react-native project.,,求帮助

E:reactbarcode>npm install
npm WARN react-native-smart-barcode@1.0.6 requires a peer of react-native@>=0.40.0 but none is installed. You must install peer dependencies yourself.

up to date in 1.554s
found 0 vulnerabilities

E:reactbarcode>react-native run-android
Command run-android unrecognized. Make sure that you have run npm install and that you are inside a react-native project.

E:reactbarcode>

问题描述

问题出现的环境背景及自己尝试过哪些方法

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)

你期待的结果是什么?实际看到的错误信息又是什么?

阅读 4.1k
1 个回答

你可以安装 yarn 之后,运行 yarn 之后再重新启动一下试试,之前遇到过高版本的 node 删除依赖包的问题。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进