I am stuck on a problem. While running commnand from cli react-native run-ios
Found Xcode project myproject.xcodeproj
Launching iPhone 6 (iOS 10.3)...
Building using "xcodebuild -project myproject.xcodeproj -configuration Debug -scheme myproject -destination id=CB73A374-3E21-4C73-BEC4-AD29A583FCE8 -derivedDataPath build"
User defaults from command line:
IDEDerivedDataPathOverride = /Users/.../myproject/ios/build
It just hangs and then nothing happens, no response.
I already checked an earlier question in stackoverflow and issue in github, but got no help. I may have asked a duplicate question but I am in badly need of a solution. Any help will be highly appreciated.
I know this is way later than the question was asked, but since it was never answered, I wanted to throw this up here cause it just happened to me.
I got past that by doing rm -rf node_modules/ and then doing npm install.
Hope this helps someone else in the future as well! :-D
This resolved the problem for me, Under project.workspace, there is a file called "contents.xcworkspacedata".(This can be opened from your IDE)
There was a duplication of the fileref tag, removed one and ran react-native run-ios, and it worked.
<FileRef
location = "group:project.xcodeproj">
</FileRef>
Another solution:
close your IDE
run in a terminal:
sudo kill -9 `ps aux | grep node | grep -v grep | awk '{print $2}'`
Re-open your IDE
re-run: (npx) react-native run-ios
For someone stuck on it in 2023, for me just trying to start a React Native project following their documentation did not work.
My Mac is M1, which caused a lot of different issues. Eventually, I solved it by:
Making sure my ruby version was correct. I used a combination of arch -arm64 rvm install 2.7.6 (The version being latest Ruby version required on boilerplate React Native project). Then to use the version, rvm use 2.7.6. I then initiated my React Native project using arch -arm64 npx react-native init <ProjectName>. Rest of the commands such as npx react-native run-ios worked as usual.
Moving the project away from iCloud Drive folder fixed it from being stuck on "Building the app..." (Still takes a while to build).
I spent my weekend trying to solve this. Hope this helps.
Related
This is done in VS Code. I have seen TONS OF similar posts, so this is a common occurence. I think it maybe stems from a misunderstanding of gradle builds so any help is greatly appreciated! I created a react-native app following their CLI guide. Running the command react-native android did not work, and I followed a stack overflow solution here https://stackoverflow.com/questions/60844245/how-solve-could-not-initialize-class-org-codehaus-groovy-reflection-reflectionc. The command works, and an emulator is created properly, without having to go into android studio and starting it from there. I do a little bit of coding, and then want to install some extensions. I install flow, and babel E6, boom react-native run-android no longer works. A workaround is to start from android studio. I have followed countless stackoverflow answers on the same question as this title, example gradlew.bat install debug error. I gave up and decided to start a new project, boom run-android doesn't work as it seems is standard. I change my gradle version as per the first link, and the command works now for this second project.
Gradlew --version of 1st project:
Gradle 6.3
------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC
Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 15.0.1 (Oracle Corporation 15.0.1+9-18)
OS: Windows 10 10.0 amd64
gradlew help of 1st project:
BUILD SUCCESSFUL in 5s
1 actionable task: 1 executed
gradlew build --warning-mode=all of first project:
The BuildListenr.buildStarted(Gradle) method has been deprecated
Internal API constructor DefaultDomainObjectSet(Class<T>) has been deprecated.
Injecting the input artifact of a transform as a File has been dprecated.
So from my understanding on their troubleshooting site, the issue lies with one of the requested tasks rather than a configuration step.
Furthermore I have tried disabling the flow and babel extensions, as well as remove the added config files that weren't included in the react-native init app. I have also tried changing the package.json file to the same as the working second project. Even if a solution is found for this project, I am still curious as to why everytime I start a react-native project I have to change the gradle version in gradle/gradle-wrapper.properties. Any help or input is greatly appreciated.
My System:
Mac OSX 10.14.6
Electron: 10.1.5
electron-forge: ^6.0.0-beta.54
I've been working on an Electron side project. I started it using electron-forge, I had a small application functioning just fine, I then set it aside for a couple weeks. Coming back to it, I tried running npm start and it did nothing but return to a new terminal line. So I tried electron-forge start and it returned bash: electron-forge: command not found.
I tried deleting my node_modules folder and reinstalling, I tried creating a new electron-forge boilerplate, and neither made a difference. I tried installing electron-forge globally, but it errored out on the second step, and I found several stackoverflow articles saying I shouldn't have electron-forge installed globally. I haven't changed anything (that I know of) on a system level, but it seems to be a system issue, rather than a package issue, but I'm not knowledgable enough to do anything other than Google the errors and see what stacksoverflow articles are out there, but no articles have helped.
I'd love any and all help, Electron has ceased working on my system completely, and I have no idea how to troubleshoot it. Thanks in advance!
I ended up deleting and re-installing Node and that seems to have fixed it. Still not sure what caused the initial issue, but it's working again. For those interested, here's the resources I used:
https://stackabuse.com/how-to-uninstall-node-js-from-mac-osx/
https://pawelgrzybek.com/install-nodejs-installer-vs-homebrew-vs-nvm/
Update:
I kept having issues running npm start. What finally worked was to create a new boilerplate project using the CLI and copy the contents of the package-lock.json to the old project. That finally launched the app.
I know this is an old question but, I had the same issue and instead of uninstalling Node, I used rm -rf node_modules then I used npm cache clean --force. I reinstalled my dependencies and electron-forge worked again.
Use the command below
npm install electron
This is insanely annoying. I have been working on a project for the past 1 week and absolutely no issue. All of a sudden, Expo decided to do this. It says "downloading javascript bundle" at 100%, yet it will not load my app. On my terminal it says
Finished building JavaScript bundle in 1319ms.
Running application on AOSP on IA Emulator.
I have reinstalled expo-cli and also expo on my emulator. Nothing works.
Please help. This is frustrating as I have been using expo for a while, with no issue at all. Normally when this happens I just restart my emulator and everything works fine. And then now....it is always stuck at "downloading javascript bundle"....
If I use my real phone, it says
Something went wrong. Could not load exp:/xxx.xxx.xx.exp.direct:80
I noticed this happened after installing expo-image-picker. Could this be the reason why? I uninstalled expo-image-picker but the issue is still here.
Solution 1:
This issue is because of any dependency that you have added into your project.
you can try removing last package that you have install.
Solution 2:
rm -rf node_modules
rm package-lock.json
npm start -- --reset-cache
npm install
Solution 3:
use yarn instead of npm, and always install the package using expo install your_package_name by this it will resolve version of package and install version which is compatible with expo
I've built an app, also published it already. Now I want to make a small change to the app, but after starting Expo I get an error:
"Error: React Native is not installed. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project."
Starting Expo (expo start) worked in the past. But starting Expo keeps failing with this error, even after running 'npm install'.
I've also tried 'expo build:android', but that also doesn't work.
All these commands are failing, also with other Expo built apps. Also an app I worked on yesterday.
What can I do to fix this?
Thanks in advance!
[edit]
I am using Expo 2.6.8. (which was a just available update)
Try updating nodejs
https://nodejs.org/en/download/
worked for me
Intro
Hi there! I'm working on my first react-native app. After months of work, I am finally ready to deploy to Test Flight. I built the project in expo. Runs great on the expo simulator. Next step, run in Xcode. I encountered a few errors but managed to find my way. Until, I hit this error, which, I just cannot seem to get around.
What I have done:
1)Ejected ExpoKit
2)Run npm install
3)Run pod install in my ios directory
The Error:
Now, I am trying to compile in debug and release configurations but the build fails :(. Here is the error I am receiving
Not sure what to do. I have searched all around and can't seem to find a working solution... Any ideas??
Versions
React Native - 0.54.2
React Native CLI - 2.0.1
I solved my issue with these steps
update pod
install pod
removed node_modules and npm install
Not sure this will help anyone but it fixed my problem.