Azure Web App unable to install NodeJS mysql dependency - mysql

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.

Related

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

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.

Deploy Rails app as desktop application in windows

I have been working for the last months on a Ruby on Rails project. The problem is that where the project is going to run there is no internet and I need to run the project as if it were on localhost when the computer start or create an executable project that will be installed on the computer. The program will run in Windows and only in one computer.
I have all the project in Ruby & HTML and the database is in PostgreSQL.
Obviously if there was internet in the office it could upload it to a server and there would be no problem.
You can create a docker container with your app environment configured and run it at system boot.
More info:
https://www.driftingruby.com/episodes/intro-to-docker-on-windows
Setup same development environment you need using offline packages from http://railsinstaller.org/en
Install Ruby on Rails and configure your application / DB.
using Adobe air you can run web app in desktop mode. https://www.adobe.com/in/products/air.html

How to install extension on server in yii2

I have an website running on server.
I want to use graph extension to show some reports.
How do install extension on server?
Locally I can use cmd for that, do I need to download project install extension and upload it again?
You have to enable SSH access on your server.
DigitalOcean SSH tutorial - here you can find some helpful informations about SSH connection.
If you connect by SSH, navigate to project directory and use composer install or composer update.
If you don't have a command line access to your server and so cannot use composer directly, I would recommend to do prepare the code locally in a 'deploy' folder and then copy the whole folder content, including the vendor directory, to the server. I assume that you can use composer locally, so that you can install the extension regularely . And I assume that the local machine and the server does differ to much (PHP version, other settings).
Installing the yii2-extension does mean: if you install it with composer install Yii gets prepared so that you can use the code like any other code in your application. Installing the extension creates an entry in `vendor/yiisoft/extension.php which gets evaluated each time the application gets loaded.

Business Objects BI Platform 4.1SP2 installation failure -- java VM installer

I am stuck at the moment and need some help advise. I am trying to install the software above on a windows 8 machine for the company I work for. Initially I installed it but when I tried to do the wdeploy predeployall I got an error with acess denied to sAPJVM, it didn't actually exist in the win64_X64 folder. After reading abit, I decided to uninstall and re-install. Howver the re-install failed with the following error
java virtual machine launcher
could not find main class: com/businessobjects/sdk/biar/utility/xsdutility. program will exit
Now I can't uninstall or install so stuck in abit of a limbo. I also notice that the SAPJVM is not there either.
Can anyone offer advise on how I get over this.
thanks
It turns out if your using a tomcat server and the server is on another box, you need to run cmd as the administrator. This was my issue.

Deploying Django on VPS using Apache2 mysql using Ubuntu

I am trying to deploy my project on VPS(Ubuntu). I tried following all the steps from the Django documentation as well as other websites without any success.
My issue is that when i run the server, it will be alive only till the terminal is open.
So i am predicting that there is some issue with the procedure am using.
I am using Django with Apache2, mod_wsgi, cartridge, mysql, python.
I am now struck with a VPS and nothing in mind.
I wish if somebody could suggest me tutorial or any documentation which will help me continue.
I have successfully run the server on Ubuntu VPS. But it is on Development server.
thanks in advance
Sameer
you will use this Link please do not miss any step after complete all steps you will able to run your application.
there are more guideline's, follow the step by step.
http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/
http://michal.karzynski.pl/blog/2013/09/14/django-in-virtualenv-on-webfactions-apache-with-mod-wsgi/
https://library.linode.com/frameworks/django-apache-mod-wsgi/ubuntu-10.10-maverick