React-native命令无法识别

时间:2017-01-16 20:41:36

标签: cmd react-native-android

我已经安装了react-native并构建了一些简单的应用程序。我跑了,一切都很好。过了一会儿,我再也无法运行我的应用程序,因为每次我键入" react-native start"在cmd中,它让我得到如下图所示的内容。有谁有想法吗? enter image description here 编辑:包json看起来像:

  {
  "name": "AwesomeProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "15.3.2",
    "react-native": "0.36.0",
    "react-native-checkbox": "^1.0.15",
    "react-native-mail": "^2.0.0"
  },
  "jest": {
    "preset": "jest-react-native"
  },
  "devDependencies": {
    "babel-jest": "16.0.0",
    "babel-preset-react-native": "1.9.0",
    "jest": "16.0.2",
    "jest-react-native": "16.0.0",
    "react-test-renderer": "15.3.2"
  }
}

1 个答案:

答案 0 :(得分:0)

根据我的说法,您需要从根项目目录运行npm install,因为您可能已从node_module文件夹中删除了一些文件,该文件将在运行上述命令后恢复。