guerrerocarlos / CacheP2P

"More users = More capacity"
http://www.cachep2p.com/
MIT License
865 stars 52 forks source link

webpack error: cannot resolve module fs #17

Open thebetterjort opened 8 years ago

thebetterjort commented 8 years ago

Trying to use the index.js or webpack yells at me if i use the mini version. When I use the index.js it says this.

ERROR in ./~/create-torrent/index.js Module not found: Error: Cannot resolve module 'fs' in /home/charliebrown/internalDocs/node_modules/create-torrent @ ./~/create-torrent/index.js 22:9-22

ERROR in ./~/parse-torrent/index.js Module not found: Error: Cannot resolve module 'fs' in /home/charliebrown/internalDocs/node_modules/parse-torrent @ ./~/parse-torrent/index.js 7:9-22

ERROR in ./~/webtorrent/lib/torrent.js Module not found: Error: Cannot resolve module 'fs' in /home/charliebrown/internalDocs/node_modules/webtorrent/lib @ ./~/webtorrent/lib/torrent.js 13:9-22

ERROR in ./~/is-file/index.js Module not found: Error: Cannot resolve module 'fs' in /home/charliebrown/internalDocs/node_modules/is-file @ ./~/is-file/index.js 3:9-22

ERROR in ./~/pump/index.js Module not found: Error: Cannot resolve module 'fs' in /home/charliebrown/internalDocs/node_modules/pump @ ./~/pump/index.js 3:9-22

deckar01 commented 8 years ago

How exactly are you trying to use index.js? What do you mean by "webpack yells at me if i use the mini version"?

browserify is used to bundle the node modules into a script for the browser.

You can run npm run build-debug if you want to build an unminified version. See https://github.com/guerrerocarlos/CacheP2P/blob/master/package.json#L64