I am having trouble with googleapis when using chat functionality on an active workflow. Please help

Hi Team,
I just built n8n using dockerfile like this:

FROM n8nio/n8n:latest
USER root
RUN npm install -g googleapis
USER node

I can test it on Code Node perfectly with the workflow not working and working. But when I chat with the public link, Code Node returns the error googleapis module not found. I have set env NODE_FUNCTION_ALLOW_EXTERNAL=googleapi, NODE_FUNCTION_ALLOW_BUILTIN=*. Please help