function getPackageRootFromNodeModulesPath(resolvedPath, dynamicImport) {
  const scope = dynamicImport.startsWith('@') ? dynamicImport.split('/')[0] : dynamicImport;
  const tailOfRootPath = `${path.sep}node_modules${path.sep}${scope}`;
  const lio = resolvedPath.lastIndexOf(tailOfRootPath);
  return resolvedPath.slice(0, lio + tailOfRootPath.length);
}
@param {string} resolvedPath
@param {string} dynamicImport
@returns {string}