Snipa22 / nodejs-pool

Other
480 stars 423 forks source link

Error: Cannot find module 'promise-mysql' #419

Open laudai opened 6 years ago

laudai commented 6 years ago

Run code commit 4b53 get error on docker ubuntu16.04

default

Does this mean mysql is not installing ? use dpkg -l will get pooldaemon@1d365fbdeafb:~$ dpkg -l | mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Thanks for your advance .

bobbieltd commented 6 years ago

Lack of dependencies , in general , lack of “npm install” , I don’t know docker.

laudai commented 6 years ago

@bobbieltd
in this script https://raw.githubusercontent.com/Snipa22/nodejs-pool/master/deployment/deploy.bash will install nvm and npm from line 41

I'm curious about if install mysql-server before run script will success install like this : default not install mysql-server befort run script will get error : default

bobbieltd commented 6 years ago

The bash installation will install mysql-server in this line : sudo DEBIAN_FRONTEND=noninteractive apt-get -y install git python-virtualenv python3-virtualenv curl ntp build-essential screen cmake pkg-config libboost-all-dev libevent-dev libunbound-dev libminiupnpc-dev libunwind8-dev liblzma-dev libldns-dev libexpat1-dev libgtest-dev mysql-server lmdb-utils libzmq3-dev

promise-mysql is a dependency in package.json (install by npm install)

bobbieltd commented 6 years ago

You can Google how to install promise-mysql (perhaps other dependencies also) for docker. I guess it is unrelated to mysql-server.

Reptillian commented 6 years ago

I fixed this issue with

npm install promise-mysql

in nodejs-pool folder