None of these solutions has helped me in my Electron App.
My solution (workaround):
npm install jquery
In your index.js
file:
var jQuery = $ = require('jquery');
In your .js
files write yours jQuery functions in this way:
jQuery(document).ready(function() {