Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

'echo' command on Windows produces unusable js file. #263

Open
decafbad opened this issue Apr 24, 2017 · 1 comment
Open

'echo' command on Windows produces unusable js file. #263

decafbad opened this issue Apr 24, 2017 · 1 comment

Comments

@decafbad
Copy link

When I followed quickstart and used 'echo' in Powershell:
echo "console.log('Hello, world')" > app/logger.js

This new logger.js file cannot be used by brunch:

18:05:26 - error: Compiling of app/logger.js failed. Error: SyntaxError: app/logger.js: 
Unexpected character '�' (1:0)

   > 1 | ��c o n s o l e . l o g ( ' H e l l o ,   w o r l d ' )
       | ^
     2 |
     3 |
Stack trace was suppressed. Run with `LOGGY_STACKS=1` to see the trace.

Looks like a UTF-16 file with Byte Order Mark.
http://i.imgur.com/9fF1i1b.png

@shvaikalesh
Copy link
Contributor

Hey @decafbad, thanks for reporting & improving Brunch.

Indeed, Brunch should strip BOM. Will fix in 3.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants