Solution to the problem -> After running “npm start” execution got stuck on starting/running packager.
When we run npm start it took some time as per your CPU and RAM configuration but in some cases, it took more than an hour which is a problem. If you are fighting with the same here is the solution.
Temporary Solution for the Problem
npm start when it shows “starting/running packager.” just press ‘q’ it will display the QR code, but it won’t display the QR code automatically. If you don’t press ‘q’, it will just say “starting/running packager”.
To solve this issue permanently you need to remove the nodejs and npm completely from your computer. To remove
Windows Users can uninstall npm and node and can download the latest one and install. If you have any issue please follow this post to install node and npm.
Linux Users can uninstall and remove nodejs and npm by running the following command
sudo apt-get remove nodejs
sudo apt-get remove npm
Then go to /etc/apt/sources.list.d and remove any node list if you have.
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/node*
After removing all the file run
sudo apt-get update
It will remove your npm and nodejs completely. Also remove the node_module from your package too.
Open the terminal and run the following commands to install nodejs and npm in Linux
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
Test using following commands
If you have any other concerns about node and npm installation please have a look at this.
After Installation of node again delete the node_module directory from your project and run
This will take some time as this will make the node_module directory again by installing the node dependencies.
After that try to run the following command again to run the project in Expo Client App.
Hope it will work as it worked for me.
If you have any doubts or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!
Hope you liked it. 🙂