My Expo project suddenly start showing Typescript missing, install. Whereas I am not using typescript at all - reactjs

I am new to react-native and expo stuff. I was working on an application that worked fine until I installed react-native-wifi-reborn.
I was following this article since I wanted to connect to wifi from the app (This was the requirement).
After adding react-native-wifi-reborn, my project started without issues until I got an error in WifiManager.connectToProtectedSsid usage.
It was a logical error and I made small code changes (I was passing the incorrect wifi password), restarted the project, and started getting the below error. I tried removing react-native-wifi-reborn and now I tried googling it but no luck. This error just won't go.
I am getting the below error whenever I try to run the project, it was working fine till now
My app.json
babel.config.json
package.json
Project Structure
Ps: I don't want to install typescript, not comfortable using it. Please help how to fix.

Related

React-navigation installation error(following official docs). Unable to resolve module #react-navigation/native-stack

There are a bunch of questions already covering this exact error, but I've been through all of them, and so far none of the answers have worked for me. Platform is MacOS
Here is the error:
Steps to reproduce
(Following official React Navigation docs https://reactnavigation.org/docs/getting-started/):
Create a new expo managed app
expo init my-app
Navigate to directory
Start the app
expo start
**** At this point everything starts and works correctly ****
Install reactnavigation(follow official docs https://reactnavigation.org/docs/getting-started/ )
yarn add #react-navigation/native
Install dependencies
expo install react-native-screens react-native-safe-area-context
Wrap the code with a Navigation container (per the docs)
Start the app
expo start
**** App no longer works. Fails with the error I posted earlier ****
Things I've tried that haven't worked
The instructions that the error message provides (though I skip step 1, as I don't have watchman watches installed). Main thing here that I would expect to work is the deletion of node_modules and yarn.lock, but no luck :(. Same with deleting cache
using yarn add to add the dependencies instead of expo install
using npm to install everything
updating expo-sdk (I'm already on latest)
reinstalling everything
So, I actually was able to answer my own question in the process of writing it. I often do this, as I make sure to spend several hours trying to debug in the process of writing the question and making sure I've covered everything I can think to try.
Not sure of official self answer etiquette, but this was a pretty frustrating error for me, so I figure I'll post what worked for me here in case it can help anyone else in the future.
Answer:
The issue for me had nothing to do with the code or app itself, but rather the IOS simulator. Force quitting the simulator and restarting resolved the error. It seems that simply ctrl^c -> expo start -> i -> r is not enough to clear the internal state of the simulator.
There was actually even a clue in the error message itself, but I missed it because the error looked so similar to the one I was expecting. The clue was in the name of the module it was unable to resolve "#react-navigation/native-stack". In my reproduction steps, I was only using the NavigationContainer, as I was trying to get that working before installing any of the Navigators and trying to use those.
Why was it trying to resolve the native-stack navigator? I'm not 100% sure, but my guess is that there was some kind of cache in the simulator that wasn't being cleared properly. Why do I think that?
This problem started with me trying to use a native-stack navigator in another app I'm working on. I quickly ran into this error, and figured the best way to debug would be to spin up a brand new blank app and try to get ReactNavigation working in there. I started with just navigation package and NavigationContainer itself, and once I couldn't even get that working, I assumed the problem was with the base react-navigation package installation. I failed to notice that it was still trying to resolve that native-stack navigator.

Next js random error "Cannot read properties of undefined (reading'map')"

So I am working with NextJs and facing random behavior. Once the application runs successfully, I do development and push code to Github. The next day I again run the app using npm run dev and face this.
So then I had to remove the repository and reset it again to make it work. But now today I am facing this again. I successfully worked yesterday, pushed the code to the git, and when I run this today I again face this error.
This seems to be something wrong with NextJS. Can anyone point out the cause?
For anyone else facing this annoying issue, #Pranta has already covered it. If it is random for you, and you aren't mapping anything, just do the following:
Delete the node_modules directory
Then npm install again.

Deploying gatsbyv2 with material-kit-react fail

my problem resides around Gatsby's production build failing to make project, which would seem and work as it should.
My goal is to adapt material-kit-react into Gatsbyv2 generated project.
done project in develop mode
so far so good i managed to do it all no problem, site looks exactly like it should in developer mode on my computer, but when i tried to put it on Github pages Gatsby build command needed to be executed, and when it did i errors appear around window object which is not defined on server where project tries to run when building (or something like that source: https://github.com/gatsbyjs/gatsby/issues/309 ). I resolved all of those errors as Gatsby employee suggested using if statement to not use window when its undefined, an it worked just fine, Gatsby ended its 'gatsby build' function and automatically published it to Github Pages thanks to ""deploy": "gatsby build --prefix-paths && gh-pages -d public""
After deploying however something strange happens to my site
project after publishing it onto Github pages
i found that it may be because css random class generator overlap somewhere, so i added JssProvider with generateRandomClassName from #material-ui/core into new layout component and it kida worked
material ui random name generator
but effect was far from desired:
deployed project after adding random class generator
and i tried to found whats wrong with this code, but i don't understand everything in react and gatsby yet and im empty of ideas. no errors, no eslint warning, everything falls apart anyway with no visible sign for me.
here is source material: https://github.com/Thrajnor/Gatsby-material-ui/tree/master/landingpage
and here is deployed page after build: https://thrajnor.github.io/Gatsby-material-ui/
i would really appreciate help or even a little advice in whats happening

Running any React-Native project for iOS results in 'Unable to resolve module' error

I'm trying out the much hyped React-Native as an alternative to native development. I have installed nvm, react, react-native, and the cli by following this guide.
I have tried downloading and running several projects from github but no project has ever run (navigate to project directory, npm install then react-native run-ios) successfully. I usually get this error: 'Unable to resolve module'.
The error mentions it may be related to https://github.com/facebook/react-native/issues/4968. It also provides some solutions, non of which have ever worked. Reinstalling the node modules never works, neither does resetting the cache. I have also tried reinstalling react, rn, and the cli. The last 'solution' is to recreate the project from scratch, which I haven't tried thus far.
The emperor has no clothes.
P.S Even the example iOS project in the react-native github repo throws errors (albeit different ones: No script URL provided.)

Module build failed - read only error

Trying to create a React app without using create-react-app so that I can learn a bit more and know what's going on in the background.
I'm trying to get webpack to work but getting this error that appears to be linked to redux-form when running webpack command.
I've just copied code from their site so not sure what the issue is?

Resources