Can't use external node modules with docker

In the example you showed me above, you are installing the package in the root directory. In order for the node to access the package “nanoid” you need to add the dependency in the node-base directory. Check the link below.