Create-react-native-app: Stuck in "Starting packager"

Created on 11 May 2017  路  31Comments  路  Source: expo/create-react-native-app

I installed the project, got the latest version with React 16, but I'm trying to reuse some code from a project using React 15 so I downgraded all versions to what's specified here. But now, it seems the process is stuck in "Starting packager...".

Any reason why I'm having this issue? And how can I fix/debug it?

Also specify:

  1. Operating system: mac OS
  2. Phone/emulator/simulator & version: npm start or npm run ios produces the same issue

Most helpful comment

For me, if I just press 'q' it displays the QR code, but it won't display the QR code automatically. If I don't press 'q', it will just say "running packager". However, then it leads to issue 81.

All 31 comments

@tleunen : You can try to find current running node processes and kill them. Also try to clear watchman watchman watch-del-all (do it multiple times), close all open terminals and react-native start --reset-cache. Had similar issue and solved by killing all node processes, clearing watchman and reseting cache.

I tried it, and killed all node processes. I even restarted the machine and it still stuck.
I can see that the script is spawning a couple of node processes, but I don't see anything but "Starting packager" in the console and the processes don't seem very active.

@tleunen : try to clean up your rm -rf node_modules folder and npm i see if that helps?

Nop :(

I tried to create a blank new app and it works fine there. So it seems there's something wrong in my other project but the system doesn't tell me what...

what sdkVersion is specified in app.json?

15.0.0

can you share the repo with me privately?

Could you try this one? https://github.com/tleunen/rn-myapp

It's a basic create-react-native-app install, then I updated the versions in the package.json and app.json, and fully rebuild/fetch the dependencies.

@tleunen - is that one broken for you too?

Yep, as soon as I change the versions for react, expo and react-native, the packager doesn't start

@tleunen - I see! the problem is that react-native-scripts isn't guaranteed to be backwards compatible, and in this case it was not. It would have been better to have an error message to indicate that -- I didn't anticipate that anybody would want to create a new project and downgrade. If you install [email protected] this will be fixed (tried it on your example project)

Oh I see. Thanks!

The reason why I wanted to downgrade is because I'm trying to integrate with another app which was built with react 15.4. And when I tried it at first, I got a few errors related to react/lib/ReactTransitionGroup not being found (probably because a few things used React 16 and some others React 15. So I wanted to downgrade and see if it resolved my issue.

Anyway, thanks for finding the root cause. Funny enough, I tried to change the version of the scripts but didn't go low enough to 0.0.26 :)

I am using Ubuntu 16.04. Now the problem happens to me even with fresh CNRA app.
https://github.com/react-community/create-react-native-app/issues/343

This should resolve the "Starting packager" issue: https://forums.expo.io/t/packager-not-loading-on-linux/2034/3

Clean installation of Antergos with Gnome, npm 4.6.1, node 6.11.2. Clean project just generated with create-react-native-app 1.0.0.
Already tried:

 sudo sysctl -w fs.inotify.max_user_instances=1024
 sudo sysctl -w fs.inotify.max_user_watches=12288

Didn't fix the issue, still stuck.

After dealing sometime with this problem, the only stable solution I found was to install watchman. Now everything is OK.

I have tried all the above solutions. But none of them had worked. It was working fine till last week. Suddenly it stopped working. Any other suggestions please.

@praWeb - jump into https://slack.expo.io and dm brent, include the output from react-native info for me (install react-native-cli (npm i -g react-native-cli) and run react-native info inside of your project)

Try to install yarn, then run 'yarn start' instead of 'npm start' or 'react-native start'

For me, if I just press 'q' it displays the QR code, but it won't display the QR code automatically. If I don't press 'q', it will just say "running packager". However, then it leads to issue 81.

For me, if I just press 'q' it displays the QR code, but it won't display the QR code automatically. If I don't press 'q', it will just say "running packager". However, then it leads to issue 81.

works for me

[email protected] start /home/harshal/react-Native/AwesomeProject

react-native-scripts start

00:44:36: Starting packager...

its been five minutes its still have'nt started, I think it will wait for infinite time?
Whats the issue here?

Well... its almost a year since this is posted. Even the "Getting Started" skeleton wont work... and i cant figure out why. This cant be right :(

Removing the following from app.json worked for me:

"packagerOpts": {
  "nonPersistent": true
}

For me the same issue was in accessing expo.io
The solution worked for me is using proxy.

Thanks to @p0liper for setting up special solution for that: https://github.com/react-community/create-react-native-app/issues/653

By me the issue was that the start command in package.json had changed from:

"start": "node node_modules/react-native/local-cli/cli.js start",

to

    "start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"

Really blows my mind that these sort of problems are in a starter seed that facebook themselves published.
If you want to get people into your platform then this is not the way to do it

Just delete the yarn lock file, and run yarn start

thanks abayo-luc that solved it!

Alot of people are using NPM; and these sorts of problems shouldnt need weird trouble shooting to fix

this is an old issue that conflates a bunch of different root causes with one message. locked conversation because it's off topic.

@kenji-1996 - this library is not published or maintained by facebook. feel free to help out or get out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iRoachie picture iRoachie  路  5Comments

anp picture anp  路  3Comments

Jawadgee picture Jawadgee  路  3Comments

FezVrasta picture FezVrasta  路  3Comments

JackWReid picture JackWReid  路  4Comments