Do I need to compile my code on the ubuntu server? - mern

When I run 'npm run build' in the vsCode terminal ,within a few seconds, it compiles. However, when I run 'npm run build' on the ubuntu 20.04 server after I've pulled my code from gihub, it takes hours and then never actually compiles. The reason is usually a memory leak, but I started increasing the memory allocation, and now the server disconnects before it ever finishes the build.
My app is a mern app, does anyone know if this is an issue with my code or is the issue that I don't need to build my app on the ubuntu server? For example could I build the app it vscode first, as that seems to work?

you don't need to build the app in ubuntu server in order to deploy the same. You can build your app anywhere and copy the content of the build folder to the server for deploying.

Related

Azure Web App unable to install NodeJS mysql dependency

I recently created a web app on Azure, I am able to run it well, however I noticed that if I add the following line
const mysql = require('mysql');
the app will crash as it is not able to find the mysql module. When I test the app locally on my machine I have no such problem, it only occurs when the app is deployed to Azure. Notice that the Azure app works well with other dependencies, but it fails in installing mysql.
What am I doing wrong? Any hint is more than welcomed. Thanks in advance!
After reproducing from our end we noticed that mysql is not visible in the node modules. In general, npm install works locally. To make it work even after deployment ensure mysql module is being installed in ./node_modules of the application.
You can navigate to Kudu of your Web app and use npm install mysql. Even after doing that if you still cant find the module in the nodemodules, then just drag and drop the module from your local machine.

Setting Up a Python Script on Ubuntu Server

Hello I just finished my a project this last spring and built a ~1500 line Python/MySQL Raspberry Pi home automation server. I have a home server built with Ubuntu Server installed and have everything setup on the GUI at the moment for debugging. I would like to have it setup so that as soon as the the server turns on manually or by wake on LAN that it automatically runs my python script. The issue I have had with this method is that since there are many threads in the program I cannot use control-c to stop the program and this would prevent me from accessing the GUI for more debugging in the future. I have had not experience with Ubuntu server and would like to know the options here.
-Thanks

Visual Studio Express 2013, new installation wont launch - The application has failed to start because its side by side configuration is incorrect

I tried installing Visual Studio 2013 Express for Desktop for the first time ever as I'm trying to get in to C# as Python doesn't really meet my needs. The installation ran fine, as I downloaded the ISO and mounted it to a virtual BD-ROM drive when the normal EXE wouldn't work. But now, when I go to run the program it tells me that:
The application has failed to start because its side by side configuration is incorrect.
and doesn't allow me to run the program. I tried to run the installer again to repair the program but it basically reinstalled the whole thing and did nothing. Any help?

Sonar Tomcat installation fails

I installed both Sonar and Jenkins on the same Tomcat (7.0.29) version. I followed the instructions, which means that I created the sonarqube database (we are using MySQL), that I built and created the WAR file, and that I deployed that file to Tomcat. I also modified the Tomcat CATALINA_OPTS value to give Tomcat more memory. Jenkins will run, but Sonar will give me a "We're sorry, but something went wrong." error. I checked all of the Tomcat logs but could not find anything useful such as an exception. Does anyone have any ideas on this?
Thanks in advance...
Deployment on Tomcat won't be supported as of next version. Therefore, I recommend you to use the standalone mode instead. Note also that is not recommended to install SonarQube and Jenkins on the same machine. See http://docs.codehaus.org/display/SONAR/Installing#Installing-SonarQubePlatformOverview.

MySQL not connecting in QT application

I'm working on a database-driven QT project (basically a journal/diary tool) that will eventually allow users to connect with MySQL, SQLite, and Postgres. For now, only the MYSQL module is built, but i'm having problems making it work on Windows.
I'm compiling against a static-built QT 4.7.4 library on windows 7, and this allowed the program to find the QMYSQL driver properly. I know this because I'm not getting the "QMYSQL driver not loaded" error when I build everything staticly. However, when I try to connect to the database, I get "QSqlQuery::exec: database not open" errors. At first, I thought this was because the remote database wouldn't accept connections from my address, but I couldn't connect to localhost (as root, with the correct password) either.
I know the application code is good because it works perfectly on Linux (Same QT version, non-static build... it seemed to "just work" when built on Linux without any extra steps) so I'm wondering if QT is built correctly on Windows. I wrote a batch file to automate the build process:
TITLE Build QT 4.7.4 (static)
ECHO ON
cd C:\qt-4.7.4\
path C:\MinGW\bin
configure.exe -opensource -platform win32-g++ -release -static -qt-sql-mysql -l mysql -I C:\include -L C:\lib
PAUSE
mingw32-make
PAUSE
Am I building QT correctly on Windows? When I first experienced this problem, I followed these instructions: http://rag.com.au/linux/qt4howto.html but it still wouldn't work after the most recent build.
I had to build QT staticly because without that my application couldn't find the QMySQL driver. At first, I tried using the includes/libraries from the MySQL 5.5 community edition, but the build failed about halfway through for some reason. (It didn't like something about that particular libmysql.lib) When I tried using the headers/libs I compiled against in Linux, the build finished properly, but I'm getting this problem now.
Does it matter where the Headers/Libraries are stored when QT is compiled?
Also, I have a triple-core CPU. During Windows build, I noticed that mingw32-make only used one core since my CPU was pegged at 33% the whole time. Is there a way to make it use the whole CPU so it won't take 4-5 hours to build?
Thanks in advance for any help/suggestions.
Try this to get the available drivers for you.
QSqlDatabase * db = new QSqlDatabase;
qDebug() << db->drivers();
This will give you the list of available drivers.
Check whether "QMYSQL" is there or not.
If it is not there, you'll have to install the driver.
Check this link for the installation.