I ran into the same problem, and during debugging I found out about something new.
When you do that -
npm install jQuery
It installs jQuery version 1.7.4 version into your project.
And when you do that -
npm install jQuery
It installs jQuery version 3.2.1 version into your project.

The difference between the two teams is just the uppercase Q. Therefore, if you get this error, you are probably using the old version of jQuery.
You can learn more about the first team (old version) here and the second team here .
source share