I am a complete beginner in the world of browserify. I recently discovered this interesting module called peer-file, which allows for file transfer between two browsers. After reading the Usage section in its readme, I realized I needed to include the script bundle.js in my web page. To create the bundle, I followed the instructions and used the command
browserify -r ./index.js > build.js
. The '-r' option stands for external require, which enables me to use the 'require()' keyword in my main script like so:
var send = require('peer-file/send')
var receive = require('peer-file/receive')
However, upon loading the web page, I encountered an error in the console:
Uncaught Error: Cannot find module 'peer-file/send'
Do you have any suggestions or solutions for this issue?