React Native Error Advice - The development server returned response error code:500 - android-emulator

I am using React Native and encountered the following error on my android emulator
I am new to React Native and was coding in App.js. I watched a tutorial online on how to use react-navigation so I was following it and created a homestack.js file. My app.js file was still working perfectly fine at this point.
I added code to homestack.js and then imported it to my app.js file but that's when this error popped up. This error was not resolved when I commented out all of the code on homestack.js nor when I commented out the import on my app.js file.
I followed the instructions on the error (clear watchman, delete node modules, yarn install, yarn reset cache) but this also did not resolve the issue.
The fix:
Since none of the above fixed the issue, I removed the homestack.js file from my root folder completely which then fixed the issue. What I did not expect however was that when I put the homestack.js file back into the root folder to see what would happen, the app ran again fine with no issues. It was as if the error never happened.
I guess my question is, what was the actual issue here? Why did taking the file out of the folder and then placing it back in fix the issue? I ran 'npx react-native run-android' after every step of the above fix process so the issue was not because the emulator was running an old version.

Following this error, You have imported react-navigation-stack without install the package. You can install the packge
yarn add react-navigation-stack #react-native-community/masked-view react-native-safe-area-context
or
npm install react-navigation-stack #react-native-community/masked-view react-native-safe-area-context
To know more https://www.npmjs.com/package/react-navigation-stack
After install the package clean project by executing command cd android && gradlew clean, then debug your project.

Related

esp-idf build fails with "fatal error: esp_wifi.h: No such file or directory"

I am a student who has gotten a part time job embedded system programming. I am given a program the company uses, and asked to understand it. This is a working program. Therefore, the project can be built and flashed on ESP32 by the developers with no problem. So, the code and CMake files should have no issues. However, I cannot build the program either with VSCode extension nor with idf.py. In fact, I cannot build esp-idf examples from the official website, either.
Note: I am new to StackOverflow as well as to ESP32, so sorry if I made any mistakes here. If this post is problematic in any way, please inform me.
The error message from the terminal is shown here
I was initially using VSCode on Windows 10 (Windows is not activated). At first, ESP extension was completely failing to start the building process because it could not locate the tools. I was getting "could not be located" errors for all the tools. Below is a list of what I did in this setting:
I had v5.0.0 for esp-idf downloaded from Espressif server. I deleted it and tried v4.3.3 and then I tried to download from Github server. I downloaded the requirements for idf.py scripting environment and completed the settings for it as described by the Espressif's documentation.
I manually set the environment variables for IDF_PATH and PATH for both the user and for the system.
After 2, the initial error was gone. Unfortunately, I had a new error which indicated that ".elf" file for the project output could not be found. I do not exactly recall the error but if it is integral to the problem's solution I can try to replicate this issue.
I tried to delete and reinstall VSCode. I tried running VSCode with admin authority.
I tried changing the IDF_TOOLS_PATH in the VSCode esp-idf extension configurations from ".espressif" to "esp\esp-idf".
At this point, I moved to try to build the project on Ubuntu 22.04.1 LTS:
In Ubuntu, I got the fatal error: esp_event.h: No such file or directory error.
It does not seem to be a common issue and I could not find much about it online.
I followed the Linux setup steps in the documentation. It said that only step 1 (Downloading the prerequisites) was necessary for the VSCode extension.
I decided to try the "master branch" from esp-idf configurations as well. After I downloaded the master branch, the error changed to the current version: 'fatal error: esp_wifi.h: No such file or directory'
I also tried the idf.py in Ubuntu but I got the same error.
Both in Ubuntu and in Windows, the Doctor Command returns nothing. It does not even open the terminal or any window. I am not sure what it should return but some online discussions were asking about its return so I wanted to note it here.
Edit: When I tried the examples on Ubuntu, they actually build just fine. Doctor Command also works with examples.
However, the main code has still issues. Initially, I assumed I made some mistakes with esp-idf configurations. But, perhaps that was not the case.
I had the same problem and ended up editing my project's CMakeLists.txt. When I added "esp_wifi" to the "REQUIRES" list, it worked for me:
idf_component_register(
SRCS "main.c"
INCLUDE_DIRS res
EMBED_FILES res/settings.html
REQUIRES esp_wifi
)

Package is not showing up in the dart packages folder even though it is installed

I have been having issues with installing this package https://pub.dev/packages/graphql_flutter/install one of it's dependencies is this graphql package https://pub.dev/packages/graphql. When i do pub get it installs en shows everything expect for the graphql package in the dart packages folders. I have tried to install the graphql package separately but the package still doesnt show up than. And the import still gives the error "Target of URI doesn't exist: 'package:graphql/client.dart'." But it does show up in flutter/.pub-cache/hosted/pub.dartlang.org so i dont understand why it doesnt show in my project. I have tried using flutter clean, flutter clean pub cache and androidstudio's invalidate caches/restart function to no avail. I have also tried restarting android studio and my pc multiple times. I have also tried it with androidstudio run as admin.
This is my pubspec.yaml
this is part of my Dart packages folder as you can see it does not show
And this is the pub.dartlang.org folder on my pc
It ended up getting randomly fixed after 3 days. I just started android studio up and tried it again and suddenly it worked. No idea what fixed it in the end
Seen this issue a few times. Open Task manager in windows and check for adb.exe. There should be one copy running. I had 2 copies so removed 1 and restarted the other.
right-click --> end task for both.
All ok then.
Reloading VS code worked for me..
Reloading can be done ---> Command + R for Mac.

SchedulerLike is not an exported member

So I was going to work on an Ionic app that I was working on last year and I didn't change anything in framework or anything. So I launch the command "ionic serve" and my app crashes saying a lot of imports don't work like in the picture:
I've tried installing rxjs-compat (even though I haven't updated rxjs) and still doesn't work.
I just did "npm i" just in case something was missing and then launched my app.
Does anyone know what could be the reason that is making everything crash?
Looks like you got unexpected updates.
Please check root directory of your project, if npm i didn't work it means you don't have package-lock.json. If you have it - try to delete node_modules and execute npm install again.
Also check whether yarn.lock is there, then you need to use yarn to install proper packages.
Without yarn.lock and package-lock.json you can only guess suitable versions.
If you remember a date when it worked - try to check which versions were actual then on http://npmjs.com/ and specify them explicitly in the packages.json without ^ or ~ prefix.

Cannot start the application. TypeError: Cannot read property 'definition' of undefined at getFieldsJsonSchemaFor

I'm getting an extremely weird error when trying to npm start my loopback application. I literally did nothing to the code and then this all of a sudden started to happen
Cannot start the application. TypeError: Cannot read property
'definition' of undefined
at getFieldsJsonSchemaFor (/Users/vikramkhemlani/Desktop/loopback/node_modules/#loopback/repository-json-schema/dist/filter-json-schema.js:101:64)
I have the same exact code in another file (which i actually created a git repo from using this repo) but this one is throwing this error for some reason
I went through the same issue.
Apparently there are caches which need to clean up before starting the application. (Expired caches also appear in openapi before I get into this issue)
The project needs to be clean and re-install packages by following:
npm run clean
npm install
I have the same problem.
However, I solved it when I tried the following.
delete node_modules directory.
npm install.
Hello from the LoopBack team 👋
This may be a bug in LoopBack introduced by recent changes. Please create a small application reproducing the problem (see our Bug reporting instructions) and open a new GitHub issue in https://github.com/strongloop/loopback-next/issues/new

Trouble debugging protractor in IntelliJ

I had my setup working just fine a month or so ago in my project for debugging my protractor scripts in IntelliJ.
However, since the project upgraded to Angular 2 release and Protractor 4.0.9, I have been unable get the debugging to work.
The error I'm getting is:
Error message: No selenium server jar found at the specified location (./node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar). Check that the version number is up to date.
So, realizing that maybe I forgot to run webdriver-manager update. And while it appeared like selenium got updated, it did not get updated in my project's node_modules folder (referenced above).
Thinking there may be something wrong, which sometimes happens, I nuked the node_modules folder, ran npm install, ran webdriver-manager update, and... I still have the same problem.
My Run/Debug Configurations item for my test is as follows:
Node interpretor: /usr/local/bin/node
Node parameters: --harmony
Working directory: [my project folder's root]
JavaScript file: node_modules/protractor/built/cli.js
Application parameters: test/e2e/myTestFile.conf.js
Environment variables: [none needed for this test]
Before launch: [blank]
Node is 6.5.0
Angular 2.0.0
protractor 4.0.9
And, fwiw, typescript 2.0.2
(Both the angular project and the protractor code are in typescript.)
Now, I am able to run my tests from the command line. But being able to step through code to find my errors, or be able to pause with access to my objects, which I can't do when I do a browser.pause().