Here are some helper commands I use to resolve JavaScript modules within emacs.
The basic idea is to extract the string inside the require or import call, then ask a node subprocess to locate that file (using require.resolve), and use emacs to open that file.
I'm sure someone more experienced with elisp can take it to the next level.
See the interactive commands section towards the end of the file.
https://github.com/ustun/emacs-helpers-for-js/blob/master/uo...