Electron build for windows shows sqlite3 error. But same build for Ubuntu Works - node.js

Packed using: Electron-Packager
Database: sqlite
The app uses Knex as a driver to query to mysqlite.
The module which it says that it cannot find is already present! But then too the error shows up.
I tried to navigate to the resource/app and then use commands like
npm run rebuild
tried installing python, node and then tried but seems like it required some CL.exe file so had to dowload Visual Studio C++ packages too but unfortunately it didn't have that file in my case.
Also tried
npm install sqlite3 --build-from-source
but got error
Can anyone help me with the exact steps to take? I also need help in knowing do i have to take this steps on the package that is already build or before i build it?

The best possible fix i got is the build the system in windows and then deploy it for windows. You need to google at every step where it breaks and then fix it. There are many possibilities and hence i cannot describe it here.

Related

Something went wrong installing the "sharp" module, on Mac M1

I had been trying to resolve this issue and had tried running the app via rosetta terminal, but same issue persists. I tried installing the sharp package globally but that to did not help.
Here is a snippet of the error :-
I think the issue is something related to Sharp package specific for the arm architecture
I was trying to setup a repo on my system locally and simply ran yarn dev. I expected the server to start but the same error keeps coming again and again .
I think your problem is related to this conversation: https://github.com/lovell/sharp/pull/3514
Specifically "On an M1/M2 based machine, the dylib files provided by a globally-installed vips (via Homebrew or otherwise) will be ARM64, therefore we cannot use these when running Node.js under x64 emulation as there will be a runtime conflict."

In the linked question, what does the op talk about regarding installing node.js in the working directory?

I am a complete newbie to all this.
I tried to install node.js 4 times and then again uninstalled it every time trying different things, thinking one of them would work.
The link to the question is-Cannot find runtime 'node' on PATH - Visual Studio Code and Node.js
After I typed $node --version in powershell terminal in VSCode (after installing node.js in C drive, defaulting to all recommended options in the setup) I get an error. I have uploaded the image of the error.
the error
Please tell me how to get node.js working with VSCode.
To get the version of Node, just type node --version in the terminal without the "$".

How to set up node-gyp correctly and simply on windows ( or avoid it all together )

Has anyone got a clear simple path for installing node-gyp correctly.
I am moving away from C# etc to node development - and while I am a newbie with node.js - I am quite disappointed that the major issues I have had have been with a Microsoft related tool.
I need node-gyp ( I think ) to be able to use printers and connect to serial ports & barcode scanners - so I need to be able to get it going consistently or somehow avoid it all together.
I have successfully compiled on 2 different machines.. but it seems that anytime I have to do something on a new machine ( for something like electron or windows server ) - then I seem to spend hours trying to get it going.
The following line is supposed to work:
npm install --global --production windows-build-tools
And then when adding a package than needs node-gyp - I get the following error
The Windows SDK version 8.1 was not found.
That SDK is installed already ( and tried reinstaling ) . I can't believe how horrible this is to configure and I have read may posts online that don't help.
It seems utterly ridiculous to install packages and complete development environments that are many GBs to get this going.
help!
I think you have not installed Windows SDK 8.1 correctly. Here is the download link:
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
When the download has finish, restart your computer and adding package ;)
~XeCrafT

Unable to install Visual C++ Build Tools, A setup package is either missing or damaged

I am trying to install Visual C++ Build Tools. But while installing I keep getting this error during setup
A setup package is either missing or damaged
I even tried copying respective package from VS Enterprise edition to the path but it keeps repeating this error. I also tried selecting download package option but no gain.
I think you might have Installed the MS BUILD TOOLS after DOWNLOADING it from the following LINK
http://download.microsoft.com/download/5/F/7/5F7ACAEB-8363-451F-9425-68A90F98B238/visualcppbuildtools_full.exe
I did the same and got the same ERROR
INSTALL using the following LINK
https://www.microsoft.com/en-in/download/confirmation.aspx?id=48159
In my case using Windows 7 I had accidently disabled some services for better performance. I used:
net start bits
net start msiserver
and it worked

Did I break phonegap when adjusting environment variables on Windows 7?

Installed node.js
Installed phonegap: npm install -g phonegap
Created the example app: phonegap create hello com.example.hello HelloWorld
Used the run command to test in Android: phonegap run android
What happened next is it didn't detect the Android SDK, so it asked me for build.phonegap.com account. I went ahead and created an account and entered user/pw and like magic, it created the app in the cloud. I pointed my qr code scanner to the screen and it installed on my Android phone. Cool, but...
I wanted to develop locally using the Android emulator. So I followed the instructions (http://docs.phonegap.com/en/3.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide) to install Android SDK, change PATH variables, etc.
When I went back to command line and cd to my phonegap root folder, suddenly "'phonegap' is not recognized as an internal or external command...'. I tried to reinstall phonegap with npm and it looks like it installs just fine again, but even when restarting cmd.exe, phonegap commands do not work.
Any ideas? Changing environment variables shouldn't affect phonegap already installed, right? The only other thing I can think is I had to install Ant and made an ANT_HOME system variable..
Apologies for the noob question. I'm sure I'm just messed up something simple here..
Figured this out. I accidentally DELETED the environment variables for node.js when I was trying to APPEND additional environment variables manually for android sdk & Ant. Since phonegap was installed as a node package, it wasn't recognized.
Better reinstall using the Msysgit and give the correct path. In my case envi variable path is as follows,
C:\Program Files\nodejs\; ->NodeJS path
F:\windows_adt\sdk\platform-tools; ->SDK Platform Tools
F:\windows_adt\sdk\tools; ->SDK Tools
C:\msysgit\bin; ->Bin Folder
C:\msysgit\git; ->git
C:\msysgit\libexec\git-core; ->git-core, if you want.
To reduce further errors use the recommended msysgit shell.

Resources