React Native: Command `run-ios` unrecognized

前端 未结 14 2169
野性不改
野性不改 2020-12-23 16:01

I have two different ReactNative-Projects:

  • a) a project from januar 2016
  • b) a complete new react-native project from now (march 20th 2016)
14条回答
  •  误落风尘
    2020-12-23 16:30

    I created a brand new react-native project using
    $ react-native init projectName
    and ran from root of the project
    $ react-native run-ios
    Everything worked fine and iOS simulator fired up as expected.

    Than I installed prop-types node module using npm install prop-types --save. Re-ran $ react-native run-ios and ran into this error Command run-ios unrecognized

    Solution: From the root of my project, removed node_module and re-installed modules using npm. Commands below

    $ rm -rf node_modules/
    $ npm install
    $ react-native run-ios
    

提交回复
热议问题