Closed stefanmaric closed 7 years ago
I've merged your PR, but I'm also interested to know what specific module causes this so I can investigate and write some tests for it.
@seangenabe I spent some good time debugging the app and finally found out what produces this error: it is the inserGlobals
option of browserify.
You can replicate:
mkdir test
cd test
npm install browserify browserify-breakdown@1.0.2
echo 'console.log("test")' > entry.js
# this one succeeds
./node_modules/.bin/browserify entry.js | ./node_modules/.bin/browserify-breakdown
# this one fails
./node_modules/.bin/browserify entry.js --insert-globals | ./node_modules/.bin/browserify-breakdown
I tested with node@6.11.0
and npm@3.10.10
this time, but I've seen this happen with a wide range of versions.