In my textbook, there is an equation expressing a nonperiodic wave function as an infinite sum of waves over a continuum of wave numbers $$ \psi(x) = \int_{-\infty}^\infty A(k)e^{ikx}dk $$
I know that $$ \mathrm{probability \ density} = |\psi|^2 \\ k=\frac{2\pi}{\lambda} $$
I determine the unit of $\psi(x)$ to be $m^{-1/2}$ by assuming that the probability density has units of $m^{-1}$ in 1D space. Since a single plane wave function is given by $\psi(x) = Ae^{ikx}$, by taking the exponent to be unitless, I get the unit of $A$ to be $m^{-1/2}$.
However, when I look at the integral expression, $\psi(x)$ appears to be the area under the curve $f(k) = A(k)e^{ikx}$. This means the unit of $\psi(x)$ would become $m^{-1}m^{-1/2}=m^{-3/2}$ considering that the unit of $k$ is $m^{-1}$ and the unit of $A(k)$ remains unchanged.
The dimensions do not match in this analysis. What am I missing?
Edit: Thank everyone for the answers. Multiple people have pointed out that the units of $A(k)$ and $A$ are not the same, but the textbook states the following:
The amplitude $A(k)$ of the plane wave is naturally a function of k, for it tells us how much of each different wave number goes into the sum.
I assume it implies that $A(k)$ is the amplitude of a single constituent plane wave of wave number $k$? If not, why is $A(k)$ expressed as "amplitude" when it is really amplitude per wavenumber?