CacheP2P icon indicating copy to clipboard operation
CacheP2P copied to clipboard

webpack error: cannot resolve module fs

Open thebetterjort opened this issue 7 years ago • 1 comments

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

thebetterjort avatar Oct 28 '16 16:10 thebetterjort

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

deckar01 avatar Oct 28 '16 19:10 deckar01