0

I'm trying to use Bower on Visual Studio 2013 (Update 5) along with Grunt, using the Task Runner explorer. I've previously used Bower on its own so the whole set-up looked rather straightforward.
However, when using the following bower.json:

{
    "name": "sample",
    "private": true,
    "dependencies": {
        "jquery-validation-unobtrusive": "*"
    }
}

I get the following error, note that the unexpected token seems to be blank (this is not a copy-paste issue):

Executing  

bower                       EMALFORMED Failed to read C:\Directory\bower.json

Additional error details:
Unexpected token

The JSON seems to be valid, what could the issue be?

Etheryte
  • 24,589
  • 11
  • 71
  • 116

1 Answers1

0

The problem is the same as in this question or this question: Visual Studio is writing a byte order mark, an invisible unicode character, to the beginning of the document.

To resolve the issue you can either use a different editor or change the file saving setting to exclude the symbol.

To do the latter, choose File - Advanced Save Options and choose Unicode (UTF-8 without signature) - Codepage 65001 as the encoding.

Community
  • 1
  • 1
Etheryte
  • 24,589
  • 11
  • 71
  • 116