Failed at the electron-mksnapshot#1.6.0 install script - visual-studio-code

Downloaded vscode source . Following their instructions to build , when I ran
scripts\npm.bat install
Failed at the electron-mksnapshot#1.6.0 install script.
the console also shows the below:
D:\vscode-master\node_modules\extract-zip\index.js:35
zipfile.readEntry()
^
TypeError: zipfile.readEntry is not a function
at D:\vscode-master\node_modules\extract-zip\index.js:35:15
at D:\vscode-master\node_modules\yauzl\index.js:31:7
at D:\vscode-master\node_modules\yauzl\index.js:96:14
at D:\vscode-master\node_modules\yauzl\index.js:342:5
at D:\vscode-master\node_modules\fd-slicer\index.js:32:7
at FSReqWrap.wrapper [as oncomplete] (fs.js:629:17)
I have installed extract-zip v 1.6.5 , this is mentioned in dependency. No Idea what is going wrong here. I deleted the node_modules and build file and checked again. Does not seem to work. Can you somebody please guide me here ?

I met the same problem today when I compiled the vscode source code with the npm#5.
You can try to remove the npm-shrinkwrap.json first. It solved this problem on my mac.
The reason seems zip path got undefined which should be ~/.electron-gyp/.electron/mksnapshot-v1.6.0-darwin-x64.zip.

Installed 4.6.1 . Didn't work initially. Took a fresh vscode source and built again and this seemed to do the trick. I had opened a git issue also and some people have posted their own solution to it.
Please check this git link issue.
Regards,

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
)

libsqlite3-0.dll was not found error when launching shp2pgsql-gui on Windows (PostGIS)

I recently installed PostgreSQL 13 on windows 10 and the PostGIS extension via the stack builder. However, when trying to launch the shp2pgsql-gui application to import a shapefile, I get a "libsqlite3-0.dll was not found" error. I can see the file under the bin folder, so I'm not sure where the problem is and googling did not help very much. I wonder what the problem may be because the installation seemed pretty straightforward to have done something wrong.
Copying the "libsqlite3-0.dll" file from \PostgreSQL\13\bin to PostgreSQL\13\bin\postgisgui and then running the shp2pgsql-gui application seemed to fix this issue for me.
This problem can occur for different reasons, but I recommend that you download that .dll from the following link (https://es.dll-files.com/libsqlite3-0.dll.html). Then replace the file in the installation folder.

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

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.

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

Getting "Error: Failed to connect to OmniSharp"

I'm trying to get VSCode working with my Unity projects, and every time I select the Project icon (the little fire at the bottom) I get the following error:
Error: Failed to connect to OmniSharp
Is anyone else getting this?
You need to download the most recent version of "mono". Open up terminal and pass in brew install mono. Then "Pick a project" and select the ..-csharp.sln file and you should be up and running.
Ok, made some progress and gotten a few Unity projects working. It seems that you need some prerequisites installed, a clean up of your Unity project folder, and possibly some hand editing of your .sln and .csproj files.
I posted a (possibly) better answer over on Reddit. Hope that's not breaking stack etiquitte.
http://www.reddit.com/r/Unity3D/comments/34d6gc/visual_studio_for_mac_help_us_vote_for_unity/
i get this on windows when my project directory has a space in it
i removed the space and removed the error
i expect it will be fixed soom
I have a completely different answer: it's the runtime that VSCode is using. It doesn't match up with what it thinks it needs. I have to remember that we're still in beta and that things are changing rapidly. I had my dnvm running beta 7, but VSCode (and OmniSharp, by extension) is looking for beta 6, so it was failing. I updated my runtime using this this post as a clue. Now I have VSCode 0.7.0 using the beta 6 runtime. I have no idea how to tell what it's looking for...I just guessed based on when they were both released. HTH