Improve detection of modules in suggested main.js