fix: require.main
undefined with createRequire()
#10610
Merged
require.main
undefined with createRequire()
#10610