I get this error when running a new react native project. There is no error with the default starter code, but if a change even a letter of the starter text, I get this error.
Failed to load bundle(http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false) with error:(/Users/Pandey/Final/App.js: ENOENT: no such file or directory, uv_cwd (null))
I had the same issue while building a node module and trying that in the test app. I solved it by closing and restarting the metro bundler.
The other methods I tried (but did not work for me):
Hope it was helpful! Cheers!
I had a similar issue and solved by switching to another directory (a non-npm project) and updating my global npm from there:
sudo npm install -g npm
then I switched back to the project and re-install the dependencies with npm install
.
Seems to be an issue with the metro-bundler task. Check your terminal tabs to see if any are open from a previous project.
Control
+ C
to end it. If you know the port it was running on, you can check the port and kill the tasks from there.
ex. sudo lsof -i :8080
Find the PID and kill it with kill -9 PID_NUMBER
.
Then go back to your root project directory and run npm start
to start a new Metro Bundler.
I just encountered this. I had multiple tabs open in my terminal, including one that had cd
d into a now-deleted copy of my project directory.
In other words, i'd deleted the directory in a different tab and re-cloned it from Github. The other terminal tab was stuck in a 'ghost' directory.
cd
out of it and back in and you should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With