React Native - launchPackager.command cant be opened

Viewed 18406

I am having trouble building react native ios project.

Error message:

"launchPackage command" can't be opened because it is from an unidentified developer.

enter image description here

Any idea how to fix this?

7 Answers

Another simple way is to delete node_modules folder from project directory and do npm install. This happened because project was copied from old mac which had node_modules folder created by that old mac user, hence some problem occurs for project transferred to new mac.

Had the same problem on macOS Mojave. This helped:

chmod 777 node_modules/react-native/scripts/launchPackager.command

Go to

  1. System Preferences
  2. Security & Privacy
  3. Choose tab General
  4. Choose Allow apps downloaded from anywhere or Allow apps downloaded from App Store and identified developers

I had the same error with you and this method worked for me.

on MacOS Catalina and above Go to

  • System Preferences
  • Security & Privacy
  • Choose tab "Privacy"
  • Select "Developer Tools" on left pane
  • Check "Terminal" to allow terminal to run software locally which does not meet system's security policy . (please be aware of potential implications of this action and make sure that you know what you are doing )
chmod 777 node_modules/react-native/scripts/launchPackager.command
  • open terminal and Run the above command
  • after that Run the react-native run-android
  • Works for Me, It will Run :)

The reason is because you downloaded source code using virtual machine.

Solution:

Please download source code at your real machine.

And then copy it at VM, and build this project.

Related