# install create-torrent
npm install create-torrent
# transform create-torrent module to a bundled js for browser
browserify -s CreateTorrent -r create-torrent > create-torrent.js
SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (2:0) while parsing /Users/username/Downloads/create-torrent-6.0.16/node_modules/create-torrent/index.js while parsing file: /Users/username/Downloads/create-torrent-6.0.16/node_modules/create-torrent/index.js
at DestroyableTransform.end [as _flush] (/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/index.js:114:21)
at DestroyableTransform.prefinish (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js:138:10)
at DestroyableTransform.emit (node:events:519:28)
at prefinish (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:619:14)
at finishMaybe (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:627:5)
at endWritable (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:638:3)
at Writable.end (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js:594:22)
at DestroyableTransform.onend (/usr/local/lib/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js:577:10)
at Object.onceWrapper (node:events:633:28)
at DestroyableTransform.emit (node:events:531:35)
Is this module still working with browserify? Looks like there are some issues with import. I'm not familar with npm/browserify and just followed the instructions by https://browserify.org/
Is this module still working with browserify? Looks like there are some issues with
import
. I'm not familar with npm/browserify and just followed the instructions by https://browserify.org/