not able to bundle js

So I'm trying to make use of the "simple-peer" library, but on their Github it says you need to bundle it using browserify. So I installed browserify, downloaded the library via npm (which created a folder named node_modules), created a folder named js in the same folder as node_modules is located and a main.js file in it containing the following:

and it should automatically merge all of the code into one bundled file, but everytime I try to run it I just get an empty file called "bundle.js.tmp-browserify-52350507248623401324" and the task never finishes. I've tryed to look up noumerous tutorials but they all say the same and I don't know what I'm doing wrong.

The node_modules folder is for dependencies that you install by npm. Your code should be in the parent folder. So let's say you have a folder myapp. In there you put your code, e.g. main.js. And in that folder you have your subfolder node_modules as created by npm. Be sure to run

npm install --save simple-peer

this will install the package to node_modules and add the dependency to package.json.

Now if you run browserify in your myapp folder, it will look for dependencies you have required in your code and build it into your bundle.

Make sure your code includes only the direct dependencies, i.e. it will be enough to require simple-peer in your code. All the dependencies from simple-peer will be found by browserify.