React Native: NPM Module being uninstall each time a new is installed - reactjs

I am using a package named react-native-linear-gradient which can be found here. I had to go through quite a lengthy process to eventually get the link to my project (by manually linking via the Binary link with libraries in XCode. I got it working fine, however, each time I install a new package via NPM, linear-gradient is removed from my node-modules folder.
1.Can anyone shed some light on why this is happening? (Happy to provide additional information)
2.Will this impact deployment of the application if this is not solved?

SOLVED: Downgraded to 5.7.1... It seems 5.8.0 seems to cause the same error Michael mentioned.

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.

Sveltekit adapter-static fails: Cannot read property 'kit' of undefined

I'm trying to build a Sveltekit site using the adapter-static.
npm run preview works fine and npm run build seems to build fine before giving me a cryptic error:
Cannot read property 'kit' of undefined.
Can you point me towards a way to debug this - I cannot find where exactly the issue is.
Svelte is still under active development. Most likely you're trying to use the latest documentation while having the older Svelte dependencies installed locally.
Upgrading your Svelte dependencies should solve the problem.
Try to create a new project with a fresh install of SvelteKit and adapter-static and then copy your code from the old project. That worked for me. Seems like the two were out of sync.

I want to use PayFort Sdk in react native with some libraries and getting error

I want to use PayFort in my React Native and luckily I found out two of these libraries 1 is RN-Payfort-SDK and the other one is react-native-payfort-sdk
and I am using it correctly but when I try to run the project both of the libraries throw me the same error
Could not find com.victor:lib:1.0.1.
Required by:project :app > project :react-native-payfort-sdk
After the error, I try to search a lot about this library and luckily found a problem that this library is not updated to mavenCenteral() as you all know jcenter() is not working anymore so the question is can someone help me regarding this library or any other method I'll be really thankful to you.
you can install react-native-payfort-sdk from my fork until this PR merge
just edit package.json
"react-native-payfort-sdk": "https://github.com/nomi9995/react-native-payfort-sdk#fix/victor-lib"
after adding this line, just do
yarn install or npm install
after installing node_modules, you should clear cache from the android studio like this
You can still use jcenter() to resolve the above old libary com.victor:lib:1.0.1 as JCenter is still readable for old versions. Your application will work unless there is a newer versions of a library that are not available on jcenter

ReactJS, create-react-app gets an error

I run from my console the "create-react-app practise1" command but it gets an error.
I couldn't understand why. Can you help me?
Normally I used it before as "create-react-app react-complete-guide" and this command had worked at that time.
I share all the codes that i get as screenshot.
Thank you,
My Console screenshot
You should probably have text like this in your error:
error Received malformed response from registry for "timed-out". The
registry may be down.
Currently part of NPM is down. https://status.npmjs.org/
Identified - Several packages including "require-from-string" are currently unavailable. We are aware of the issue and are working to restore the affected user and packages. Please do not attempt to republish packages, as this will hinder our progress in restoring them.
Jan 6, 19:45 UTC
This isn't a problem directly with create-react-app itself but one of it's dependencies it needs, require-from-string. And that issue is coming from the npm registry itself, and temporarily, not create-react-app. See this about the npm registry status and this issue from create-react-app itself:
What you can do, is if you have another project bootstrapped with create-react-app, you can copy it and make changes as neccessary for starting a new project. Or - you can wait until this issue from the npm registry is resolved. This is what happens when modern projects take a large number of dependencies - if a few of those dependencies aren't available, the whole project can have problems.

Using Quick Install in Visual Studio doesn't actually add the packages to your project

Hello I'm trying to use the Visual Studio extension Quick Install Package to install packages via bower and npm. One example is angular-loading-spinner
When I give the command using the interface, I see that the package.json file is updated and or the bower.json file is updated with the package dependency, but I'm still unable to actually reference the packages as instructed in my html using the tags. No actual files are added to the project, so I feel like I'm really missing something here, or simply don't understand what this package installer is actually meant to do. There doesn't seem to be any clear tutorial on this I can find online, or any good information. It just all assumes it works fine. Can anyone please advise? Thanks]1
Mike, I'm glad to know that my answer was the correct. For future users that have the same concern, they need to look at the folder node_modules to find out all the libraries installed.
This was put in the node_modules folder as pointed out by Jonathan Brizio. The issue was that the files were hidden and had to be included in the project.

Resources