for my future self and anyone.
When rebuilding the image using this command below, all modules are gone.
`docker-compose up --build -d`
solution is to execute the following .sh file, it will install additional modules
#sh file
#stop current docker
docker-compose stop;
docker-compose up --build -d;
#install your modules in the docker as a global
echo "installing external modules"
#version 1 exec command
docker exec -it -u root n8n_2024 /bin/sh -c "npm install -g mout iso-3166-1-alpha-2 mysql @hubspot/api-client axios sanitize-html dom-parser bottleneck node-html-parser html-table-to-json cheerio"
#or use this alternative version 2 exec command
docker-compose exec -u root n8n_2024 npm install -g mout iso-3166-1-alpha-2 mysql @hubspot/api-client axios sanitize-html dom-parser bottleneck node-html-parser html-table-to-json cheerio
#both commands above achieve similar thing. 2nd exec command is more elegant to me.
echo "installation done"
echo "N8N ready for use"
~