Custom nodes deleted on palette install

Ok I found the way to do it. If someone need the answer:

Don't put custom node directly in the node-red/node_modules directory. Instead, I placed them in a folder next to node-red folder. In command line, go in the node-red folder, npm install

It creates a junction from the node-red/node_modules folder to the custom node foder. It also add a path to the custom node folder in the node-red/package.json AND node-red/package-lock.json.