React-native: reaact native version 0.60. ++ new project error Failed to run jetifier. Run CLI with --verbose flag for more details.

Created on 16 Jul 2019  ·  18Comments  ·  Source: facebook/react-native

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
error Failed to run jetifier. Run CLI with --verbose flag for more details.
Error: spawnSync C:\reactNative\moFCMnode_modules\jetifier\bin\jetify ENOENT
at Object.spawnSync (internal/child_process.js:990:20)
at spawnSync (child_process.js:601:24)
at execFileSync (child_process.js:629:13)
at Object.runAndroid [as func] (C:\reactNative\moFCMnode_modules\@react-native-community\cli-platform-android\build\commands\runAndroidindex.js:101:41)
at Command.handleAction (C:\reactNative\moFCMnode_modules\react-nativenode_modules\@react-native-community\cli\build\cliEntry.js:160:21)
at Command.listener (C:\reactNative\moFCMnode_modules\commanderindex.js:315:8)
at Command.emit (events.js:189:13)
at Command.parseArgs (C:\reactNative\moFCMnode_modules\commanderindex.js:651:12)
at Command.parse (C:\reactNative\moFCMnode_modules\commanderindex.js:474:21)
at setupAndRun (C:\reactNative\moFCMnode_modules\react-nativenode_modules\@react-native-community\cli\build\cliEntry.js:210:24)

react-native run-android --no-jetifier work.
But I want to know if it will have any effect?

React Native version:
version 0.60. ++

Bug

Most helpful comment

same issues , please fix soon

All 18 comments

This is also happening to me, I updated everything today, even uninstalled and reinstalled to the latest versions of node and android, and I've already created to react-native apps.
Just doing react-native init project, then going to the directory of my project and executing react-native run-android and that's all it takes for that message to pop-up.
I understand Google just did a major update or at least a relevant update with AndroidX, and I'm sure we all will need to be sure our apps can run with this new update.
Doing the --no-jetifier thing is just a temporary thing and can’t keep doing it forever.
On that same note, executing in the terminal yarn add jetify doesn’t do much.

you are right
error An unexpected
error occurred: "https://registry.yarnpkg.com/jetify: Not found".

i think this is a bug, please open a bug report

I had the same problem.It worked yesterday.
Another post said use this command to start.
react-native run-android --no-jetifier

temporary run with
react-native run-android --no-jetifier

确实出错了,是因为react-native的更新问题吗?

still having the same issues
Another post said use this command to start.
react-native run-android --no-jetifier
this works fine but you can't keep running like this all the time
i hope there will be a fix soon

same issues , please fix soon

--no-jetifier doesnt work either if you have a lib that requires jetifier such as react-native-gesture-handler

cmd react-native run-android --no-jetifier
it will work

I've just built from the latest and received no errors, as below:

react-native init NewProject

npx react-native run-android

This didn't start my metro builder, so in another terminal -

react-native start

Then:

npx react-native run-android

Environment:

Node : v10.2.1
NPM/NPX: v6.9.0
Mac OSx

Package.json

{
  "name": "testproj",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.8.6",
    "react-native": "0.60.3"
  },
  "devDependencies": {
    "@babel/core": "^7.5.0",
    "@babel/runtime": "^7.5.0",
    "@react-native-community/eslint-config": "^0.0.3",
    "babel-jest": "^24.1.0",
    "jest": "^24.1.0",
    "metro-react-native-babel-preset": "^0.54.1",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

I am getting the error unknown option --no-jetifier

@wkwyatt Please update the @react-native-community/cli to the latest version.

error: unknown option `--no-jetifier'

The same problem occurred after upgrading to the latest versions, after several searches, got to the project link at npm, followed the step by step link below and solved the problem.

https://www.npmjs.com/package/jetifier

@narratones thank, this works for me

The same problem occurred after upgrading to the latest versions, after several searches, got to the project link at npm, followed the step by step link below and solved the problem.

https://www.npmjs.com/package/jetifier

how to implement these steps ...

Was this page helpful?
0 / 5 - 0 ratings