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.
Related
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.
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.
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
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.)
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.