In this paper we prove an existence theorem for the Cauchy problem \[ x^{\prime }(t) = f(t, x(t)), \quad x(0) = x_0, \quad t \in I_{\alpha } = [0, \alpha ] \] using the Henstock-Kurzweil-Pettis integral and its properties. The requirements on the function $f$ are not too restrictive: scalar measurability and weak sequential continuity with respect to the second variable. Moreover, we suppose that the function $f$ satisfies some conditions expressed in terms of measures of weak noncompactness.