Error while installing nodeJS mysql package on Windows 7 - mysql

I am new to nodeJS,
I am trying to install mysql package of nodeJS as
>node
>npm install mysql
and also with
>npm install node-mysql
but getting error as
npm should be run out side of the node repl in your normal shell
so i run the same command in side nodeJS directory in program file
still getting error check images

This error is indicating that the path referred to in the screenshot above (.../AppData/Roaming/npm) is not available (doesn't exist or isn't accessible by your user).
Can you make sure there is a folder npm at this path:
c:\Users\mayank.bhadauria\appdata\roaming
If not, please create it and then try npm install node-mysql again.

Related

Deploying Django project on pythonanywhere: Error running WSGI application

I have a mysql database for my django project. Had also installed XAMPP for local development. While deploying I did. I think there's a problem with the python version of my pthonanywhere bash console. My project can support only python 3.7 because of the kiteconnect module that I am using.
I have installed kiteconnect, mysqlclient, and mysql connector (checked it with pip3 freeze too)
pa_autoconfigure_django.py --python = 3.7 <git-repo-url>
I set up my database and made the changes suggested in my settings.py file in DATABASE, (changed hostname, database name, passowrd, PORT:3306, etc). I am getting this error in logs:
Error running WSGI application
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Please help me. This is a project I'm working on. Will be happy to provide further inputs too.
pa_autoconfigure_django creates a virtualenv using the requirements.txt file in your project. If you do not have mysqlclient in your requirements.txt file, then it will not be installed in the virtualenv.

Can't run PopSQL in Ubuntu 18.04 with node v11.2.0

To learn MySQL I installed PopSQL using .deb package but it's not working, when I launch PopSQL from terminal with sudo popsql I get these error in the terminal and PopSQL ui shows blank screen.
{"name":"PopSQL","hostname":"ivyRose","pid":16621,"level":30,"msg":"Starting app. Look for crash reports in /tmp and error logs in /home/neon/.config/PopSQL/error.log","time":"2018-11-22T12:15:27.927Z","v":0}
(popsql:16621): IBUS-WARNING **: 18:00:28.174: The owner of /home/neon/.config/ibus/bus is not root!
[Oracle] NJS-045: cannot load the oracledb add-on binary for Node.js 8.2.1 (linux, x64)
Node.js require() error was:
DPI-1047: 64-bit Oracle Client library cannot be loaded: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help
Node.js require() mapped to /opt/PopSQL/resources/app.asar/node_modules/oracledb/build/Release/oracledb.node
Node-oracledb installation instructions: https://github.com/oracle/node-oracledb/blob/master/INSTALL.md
You must have 64-bit Oracle client libraries in LD_LIBRARY_PATH, or configured with ldconfig.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
[ODBC] libodbc.so.1: cannot open shared object file: No such file or directory
You don't need PopSQL to learn MySQL.
But, if you want it, to get it going, follow the error message instructions:
download the Instant Client Basic Light package from
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
unzip it
add the directory to your library search path, either via LD_LIBRARY_PATH or using ldconfig (I recommend the latter), as shown at
https://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
PopSQL should use a try/catch block when it requires oracledb so you don't see the error.
It looks like you are missing the required driver from mysql. You can download and install this from
https://dev.mysql.com/downloads/connector/odbc/
The answer here should help.
https://askubuntu.com/questions/800216/installing-ubuntu-16-04-lts-how-to-install-odbc?answertab=votes#tab-top

Electron cannot find module mysql

So i've been creating a desktop application using electron. The problem is that when I run my application using npm it doesn't show any error about a missing module but when i package it and run it this error shows
I'm sure that i've install mysql module using npm install -g mysql and npm install mysql in the project directory. It's all working fine when i run the unpacked version of the application
Assuming that you have installed mysql if not please install mysql npm install mysql --save-dev
Hi I also ran in same error I tried everything possible but nothing seems to work , after several hit and trial I was able to fix it and in the end realize that it was all happening because of
When I installed MySQL module I never saved it (--save-dev)
And electron-packager was not able to locate it when I pack it because was not mention in package.json
A solution might locate mysql folder in node_module folder and delete
then install it npm install mysql --save-dev
or manually
add it under dependencies in package.json file

Can't use npm_modules after installation

I'm starting a project where im going to use AngularJS, NodeJS and MySQL. This is my first real web application, and it's also the first time im using npm.
I've installed Node from their official website, and when i write npm install the node_modules comes to the project directory.
The problem occurs if I try to use any of the installed npm_modules. I tried to download mysql, and the installation worked, but when i type mysql -p i get: "bash: mysql: command not found"
I've also tried to install it with npm install mysql -g, but it still doesn't work.
If it means anything my $PATH is /usr/local/git/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/bin
The mysql npm package contains just the nodejs client library for mysql. You need to install the mysql server separately using the appropriate method for your OS.
it looks like you have not installed mysql on your system.
install mysql server using the following command
sudo apt-get install mysql-server

Ruby (Rack) application could not be started - mysql library error

Bluehost just upgraded their MySql version and broke my application.
I now get "Ruby (Rack) application could not be started" and this specific file load error:
libmysqlclient_r.so.16: cannot open shared object file: No such file or directory - /home4/mychairs/ruby/gems/gems/mysql2-0.3.11/lib/mysql2/mysql2.so
Notice the super long root-based path.
Running
bundle install
via SSH and then
bundle show mysql2
I am told that I am using this library:
/home4/mychairs/ruby/gems/gems/mysql2-0.3.11
I cannot tell where the abnormal path is being generated.
Remove the mysql gem manually and reinstall it via 'bundle install'. Bundler has no idea the underlying MySQL lib has changed, it just knows that the gem is there.