browserify/brfs

brfs chokes on #! /usr/bin/env node

Closed this issue · 1 comments

When I browserify JSONStream, the line #! /usr/bin/env node, causes brfs to throw an error.

Works fine without the brfs transform.

C:\Users\Michael\Github\javascript\convert-and-seed-audio>browserify node_modules/JSONStream -t brfs -o deleteme.js
SyntaxError: Unexpected character '#' (1:0)
    at Parser.pp.raise (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\node_modules\acorn\dist\acorn.js:1745:13)
    at Parser.pp.getTokenFromCode (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\node_modules\acorn\dist\acorn.js:3486:8)
    at Parser.pp.readToken (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\node_modules\acorn\dist\acorn.js:3189:15)
    at Parser.pp.nextToken (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\node_modules\acorn\dist\acorn.js:3181:71)
    at parse (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\node_modules\acorn\dist\acorn.js:100:5)
    at module.exports (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\falafel\index.js:22:15)
    at C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\index.js:37:23
    at ConcatStream.<anonymous> (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\concat-stream\index.js:36:43)
    at ConcatStream.emit (events.js:129:20)
    at finishMaybe (C:\Users\Michael\Github\javascript\convert-and-seed-audio\node_modules\brfs\node_modules\static-module\node_modules\concat-stream\node_modules\readable-stream\lib\_stream_writable.js:460:14)

C:\Users\Michael\Github\javascript\convert-and-seed-audio>browserify node_modules/JSONStream -o deleteme.js

C:\Users\Michael\Github\javascript\convert-and-seed-audio>

I am using browserify on a project that uses brfs and JSONStream, so I would like them to play nice together.

Using brfs@1.4.0.

Fixed upstream in static-module 1.1.3. Thanks for the bug report!