The formation of multiple close-in low-mass exoplanets is still a mystery. The challenge is to build a system wherein the outermost planet is beyond 0.2 AU from the star. Here we investigate how the prescription for type I planet migration affects the ability to trap multiple planets in a resonant chain near the inner edge of the protostellar disc. A sharp edge modelled as a hyperbolic tangent function coupled with supersonic corrections to the classical type I migration torques results in the innermost planets being pushed inside the cavity through resonant interaction with farther planets because migration is starward at slightly supersonic eccentricities. Planets below a few Earth masses are generally trapped in a resonant chain with the outermost planet near the disc edge, but long-term stability is not guaranteed. For more massive planets the migration is so fast that the eccentricity of the innermost resonant pair is excited to highly supersonic levels due to decreased damping on the innermost planet as it is pushed inside the cavity; collisions frequently occur and the system consists one or two intermediate-mass planets residing closer to the star than the discs inner edge. We found a neat pileup of resonant planets outside the disc edge only if the corotation torque does not rapidly diminish at high eccentricity. We call for detailed studies on planet migration near the discs inner edge, which is still uncertain, and for an improved understanding of eccentricity damping and disc torques in the supersonic regime.