I am currently working on Electron with Babylon. I found this repo which I basically used as a boilerplate for my own project. Everything was working well until I tried to add jquery.pep.js for other needs. I keep on having this mistake :
Uncaught Error: Cannot find module 'jquery.pep.js'
I installed both libraries with "npm i -S jquery" and "npm i -S jquery.pep.js". In order to make jquery works, I added this script in the head of my index.html
<script> delete window.module; </script>
and this line in the top of my main.js :
window.$ = window.jQuery = require('jquery');
Now, jquery is working fine but for some reasons, jquery.pep.js module still can't be found. I tried to use 'require' but I have the same error
main.js
window.$ = window.jQuery = require('jquery');
var pep = require('jquery.pep.js');
Project structure
css/
img/
js/
-- main.js
node_modules/
index.html
index.js
package.json
renderer.js
js
folder, runningnode
and then printingmodule.paths
, you have'jquery.pep.js'
somewhere in the paths listed by this command?