Running ejected project throws "Expo sdk required expo to run" - reactjs

I created react-native project using create-react-native-app. In this I am importing Permissions module from expo,
import {Permissions} from "expo";
Later I realised that expo doesn't fullfill all my requirements (like social sharing etc), so I decided to eject the expo project. I ran following command to do so
"npm run eject"
After detaching, I installed expo as my project dependency to resolve imported Permissions module from expo.
"npm install expo"
Now when I run "npm run ios", I get this big error in my ios simulator.
Leads here is appreciated.
Thanks!

Once you eject you're now using ExpoKit & no longer using the Expo sdk. The docs can be found here, here & here.

Related

Electron App not Working After Packaging - Electron Forge

So I am trying to Package my application using Electron-forge.
Tested it Locally using "electron-forge start" and it's running fine.
Also, while packaging for Linux platform [ running npm run forgeL64] the operation was successful.
"forgeL64": "npm run forge -- --platform=linux --arch=x64",
"forge": "npm run build && cross-env DEBUG='electron-forge:*' electron-forge make",
But while running the application after packaging it's not even opening the Electron Shell.
I tried all the Solutions which I can like electron-log (for which I am not seeing any Logs in the specified location of Linux Dir). Also, tried using electron-unhandled which is also not showing me any kind of error while I am executing the app.

"crbug/1173575, non-JS module files deprecated" when starting react app with "HTTPS=true npm start" instead of "npm start" in Linux

I'm trying to run my react app with https.
An article I read said that in order to do so in Linux I need to run the code "HTTPS=true npm start" when starting the react app instead of the regular "npm start".
But when I did it I got a white screen and "crbug/1173575, non-JS module files deprecated" written in the console.
Any ideas why it happens and how to solve it?
Article link:
https://create-react-app.dev/docs/using-https-in-development/

Create-react app integration with django backend vs babel and webpack pipeline

I've been trying to get up a react and django application. First, I had followed this set of videos here: https://www.youtube.com/watch?v=6c2NqDyxppU&list=PLzMcBGfZo4-kCLWnGmK0jUBmGLaJxvi4j&index=3. There was a bunch of commands that you can see in the description that needed to be run in as well as a lot of copy pasting configuration files.
Later, my friend told me that create-react-app existed and would set up everything needed with just one command. I tried it, and it worked really well. However, there were issues with connecting it to django. The files that came out of create-react-app were different to the ones shown in the video and when I tried searching it up, a few solutions said to use npm run build and pass the build folder into django.
Running a build takes quite a long time and it is not automatic as it was when I had the webpack and babel system. What am I supposed to do to configure create-react-app so that I can get it to update automatically and get it into django.
Some places said that I could edit the config files when I do npm run eject. There is a problem that the package.json files in the tutorial project and the create-react-app project are not the same. The thing that lets the webpack and babel project update is this snippet of code in the package.json file:
"scripts": {
"dev": "webpack --mode development --watch",
"build": "webpack --mode production"
},
I ejected my create-react-app project but create-react-app doesn't use webpack so I won't be able to use this. What do I do?

Builderx to expo

Is it possible to open a project made in builderx? I found that tool and it is good, but when trying to emulate it with expo it gives me many mistakes, is there anyone who uses this tool? If so, can you tell me how I can emulate the project?
You can either download the whole project and then run yarn or npm install. Or you can download the component and then use it in your existing react native project.
If you are downloading a component in which some third party components are used, you will have to add those libraries manually in your existing project by yarn add [library-name] or npm install [library-name] --save.
You can check this
Save your project in BuilderX. It will give you the Expo project.
Go to the root of the project in terminal. run the following commands.
"npm install" or "yarn"
"npm start" or "yarn start", once this command is run successfully, you'll get a QR code at the end of the output
Scan the QR code in Expo App of your mobile and It will run the project in Expo.

React Native "The expo SDK requires Expo to run. .... this code is not running on Expo."

I am coding with React Native. I don't see that when I first create react-native app for check running. When I implements my code see that. My purpose is generate apk.
app.json
build.gradle
index.js (index.android.json)
App package.json
Solved
Result: I solved my problem with npm install. I would like say many month after.
If anyone's getting this error after upgrading Expo, try restarting your simulator - that fixed it for me.
Here is my experience if someone using expo sees those error message.
I accidentally installed expo manually in my project which was version 29.0.0.
I was using version 28.0.0 of expo sdk, so it may have crashed inside.
What I did:
manually upgrade sdkVersion of app.json to 29.0.0.
change sdk version to 29.0.0 for react-native.
Had exactly the same error - fresh machine, fresh npm, only one version of expo installed.
Turns out, expo requires you to build it as an app before it can send it to the expo app properly (at least on Android). This is easiest done by:
Adding an "android" section to app.json, with the contents "package": "uk.co.yourcompany.yourpackagename" (this is required by android packages. It can be complete garbage, but should follow that format - a backwards domain name)
running expo build:android and following the instructions to sign up to expo's servers and build the app
then restarting expo start
Not sure if this is documented anywhere though, so may be a new thing?
Another thing to try is to move your node_modules folder away (or maybe delete it, up to you) and re-run npm install
According to the official tutorial: https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html
If you want to use expo in your application, you must create it in the following way
npm i -g create-react-native-app
create-react-native-app my-project
cd my-project
npm start
This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript.
as I see your code has files that are not necessary, such as build.gradle and index.js, the structure that create-react-native-app creates is different and easier to use
I was getting the same error after updating the expo-cli to version 3.0.6.
By looking at my package.json I noticed the expo-cli version installed on my computer is not the same as package.json. so I changed it to "expo-cli": "^3.0.6" and ran npm install || yarn, then the error disappeared!

Resources