0

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?

Ahmad Mhaish
  • 111
  • 1
  • 8
  • I've a similar problem with python env. Did you solve your problem? If yes, can you give me some hints? – Pipe Dec 10 '20 at 20:04
  • it appeared to me that I need to remove the environment and create it again, and it would help if you change the image name or but a tag for it, mostly the image is cached without doing that – Ahmad Mhaish Dec 19 '20 at 22:20

0 Answers0