Install pyright in remote machine (offline), causing "Cannot find module './dist/pyright-langserver'" error

I spent a few hours to realize this error was caused by incorrectly copying a soft link from one machine to another.

The context is, I have a remote offline machine where I like to have neovim working. So I zip the whole ~/.local/share/nvim/ folder in my online machine and then copy (via flash disk) & unzip it on the remote one. Then my pyright was never started working. The log book print out a "Cannot find module ‘./dist/pyright-langserver’ " error.

The reason is: in the original folder ~/.local/share/nvim/lsp_servers/python/node_modules/.bin/ has two soft links:
“pyright” & “pyright-langserver” pointing to ~/.local/share/nvim/lsp_servers/python/node_modules/pyright/index.js & langserver.index.js
these two executable files. So after the copy, these soft links become two real files that hardcopy the two original ones. And when the offline machine executes the hardcopy version of index.js & langserver.index.js, it throws out module not found, since they were written with relative paths.

To conclude, one solution is to remove the two .bin/pyright .bin/pyright-langserver files and create two new soft links like below:
in .bin/ folder
$ ln -s ../pyright/langserver.index.js pyright-langserver
$ ln -s ../pyright/index.js pyright

In my case, the error was resolved. And pyright works like a charm.