mysql and mysql2 not working inside Fission runtime

82 views Asked by At

I tried to create my own Fission NodeJS runtime image, I tried to install mysql and mysql2 npm packages. My docker file is using node:8-alpine base image.

But always when running a function I am getting the following error

user code load error: Error: Cannot find module 'mysql'

I tried to install mysql and mysql2 globally inside my DockerFile, but still without any luck

RUN npm install -g mysql
RUN npm install -g mysql2

I am always updating the environment using the next command:

fission env update --name nodejs --image mindbehind.azurecr.io/fission/nodejs-env

But even I tried to remove all functions and all environments and re-install from scratch the new environment and my function. I already installed other libraries before so I am sure that I could update the Fission NodeJS environment.

I could not understand why is that, anyone has experienced that before and could solve it?

0

There are 0 answers