It is an expo-eject project and the commands I have used after cloning the project are:
Yarn,
Yarn start,
Yarn android,
And it does not show any error but gets stuck on a same point everytime when I try to run the project.
The project runs fine on the laptops of other teammates, but I am facing this issue.
Here are the versions of the installed tools:
Nodejs 14.17.6,
Expo 4.11.0,
React-native-cli 2.0.1,
I am adding an image that shows where the project gets blocked.
This is the issue in running project.
Had the same issue, and tried #usama-alaf reply, which consisted of:
Installing the right SDK for the Android device
Linking the SDK path under project/android/local.properties
But none of the above worked for me. Digging a little deeper, I found this Github issue from Willem Horsten, where the developer states that there was a yarn.lock file on one of his Hard Drives. I'm actually running my development environment on a secondary HD, and I also had a lock file in the root of the drive, but after deleting it, nothing changed.
Here's what actually worked for me. I was running Node v12, and trying to build the project, and trying to check whether the Node version was the culprit, I did this:
Deleted my node_modules, yarn.lock, and all other lock files I could find (for some reason there was also a package-lock.json file on the project)
Since I'm using NVM, I switched to Node v15.14.0 (the latest I have installed).
Installed the dependencies again with yarn install
Ran yarn android, and the build worked this time.
Related
I uploaded my react project created in linux(because in Windows, create-react-app is stuck forever, that's an issue by itself), uploaded it to github, and then cloned the repo in my windows machine to further work on it. To my surprise, the npm install was stuck forever at a certain point(I need a solution to this as well), so I terminated the process, and now while deleting the project directory, it stucks at a specific point. What should I do now?
have you tried window.location.reload(false);
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
I have a project build on react-native version 0.55.4. It was woking fine on old system. I have to change system due to some reasons. I setup on new system, I am able to run project using react-native run-android but when building a signed APK using ./gradlew assembleRelease I am receiving following error.
Task :app:processReleaseGoogleServices
Parsing json file:
<Project-Directory>/android/app/google-services.json
FAILURE: Build failed with an exception.
What went wrong:
Could not list contents of
'<Project-Directory>/node_modules/react-native/scripts/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.
I know this issue is already on stack overflow Invalid symlink in node_modules error when trying to deploy to simulator (RN 0.45). I have tried it. I have also tried following github question.
https://github.com/facebook/react-native/issues/11212
https://github.com/facebook/react-native/issues/14417
https://github.com/facebook/react-native/issues/14548
https://github.com/facebook/react-native/issues/14464
I have also tried following things.
Deleting node modules and reinstalling them
Deleting .bin folder in node modules
Deleting react-native/third_party folder in node modules.
Copying node modules from older system.
Copying third-party and glog-0.3.4 from older system.
Deleting test-driver file inside third-party folder.
Unlinking test-driver file inside third-party folder.
Installing automake-1.16 and creating a new alias of test-driver file inside third-party folder.
My java version is 1.8.0_201. My android studio version is 3.3.2. Projects react native version is 0.55.4. My mac os version is 10.14.4. My x code version is 10.2.
Please help.
Thanks in advance.
Unlinking as below and restart with the cache cleaned
In project folder:
unlink ./node_modules/react-native/scripts/third-party/glog-0.3.4/test-driver
and then stop js server and run:
npm start -- --reset-cache
It should work
I have a react-native project where I changed my project name in package.json due to eslint warnings. Now when I try to run react-native link to link any library, I'm getting the following error:
Scanning folders for symlinks in /Users/my-username/projects/myproject-folder/node_modules (20ms)
rnpm-install info Linking assets to ios project
rnpm-install ERR! Something went wrong while linking. Error: ENOENT: no such file or directory, open '/Users/my-user-name/projects/myproject-folder/ios/my-old-app-name.xcodeproj/project.pbxproj'
So it doesn't find the file project.pbxproj, as it is looking at it from the wrong folder.
What I have tried so far with failed outcomes:
react-native upgrade
react-native-rename
Deleted node_modules and run npm install again
Renamed app name to correct in index.ios.js for AppRegistry.registerComponent
Where does react-native link look for the file project.pbxproj? If I find that location, I could rewrite it to the new correct one. I have no xcode, and currently only android version. I (still) have the separate index files for both versions, even I heard that after some react-native upgrade they should have been merged...
Was able to solve this by deleting the other project folders in the ios -folder. Apparently react-native just loops through every project there it finds, and picks the first one.
I stumbled this problem just today. Here are the steps I made to make it work again
Delete the ios folder
react-native eject // this will re generate the ios folder
react-native-link
I also did gradle clean before the earlier steps but I think its unnecessary.
im trying to run a node.js example project that i downloaded from here
I downloaded node.js and npm and checked both versions using CMD as seen below.
At first the version of npm wasnt compatible but i followed a youtube guide and now it seems the versions are compatible. If i didnt mention, im using Windows os.
I then installed the socket package by typing in "npm install socket.io#0.9.10 node-static" in cmd and a bunch of writing happened until it finished.
I then open cmd and do, "cd ... then the folders which contain the project" until its the root folder.
I then type in cmd "node app.js" which is the js file contained in the project.
I get this as a result:
The tutorial im following then tells me to go to http://localhost:8080 to see a local copy of the demo but when i do, chrome just loads and loads then after a few minutes says it cant be reached. does anyone know what im doing wrong? any help is appriciated
afaict you're not doing anything wrong, Doesn't work for me either. It was written in 2012 so it's quite possible this worked fine with an older version of Node.JS and older versions of some dependencies. To get it working for me locally I made the following changes:
Change the handler function in app.js to
function handler (request, response) {
fileServer.serve(request, response);
}
And instead of installing an old version of socket.io I installed the latest. You may want to delete your node_modules directory in the project and then:
npm install socket.io node-static