I have already seen that some people have faced this problem but I have not seen a solution.
I have a lot of modules deployed on google cloud and each of them has a cloudbuild.yaml file to be built on the cloud.
However several methods are duplicated and I would like to import these methods from a module that would be common to all without losing the possibility of building my modules separately.
The simple ‘require’ of node.js only works locally but once on the cloud we lose the links between the library and the module.
I have this scheme :
`root/
├── module1/
│ └── package.json
│ └── index.js
| └── cloudbuild.yaml
├── module2/
│ └── package.json
│ └── index.js
| └── cloudbuild.yaml
├── module3/
│ └── package.json
│ └── index.js
| └── cloudbuild.yaml`
If anyone has a solution thanks to him.
Currently I thought about this type of scheme but by doing this I would lose the possibility of building my services separately and this is not what I want :
`root/
├── common/
│ └── package.json
│ └── index.js
├── module1/
│ └── package.json
│ └── index.js
├── module2/
│ └── package.json
│ └── index.js
├── module3/
│ └── package.json
│ └── index.js
└── cloudbuild.yaml`