user3284007
user3284007

Reputation: 1717

Bower Malformed

I'm learning how to use Bower. In an effort to get started, I've created a basic bower.json file whose responsibilty is to get jquery. My bower.json file looks like this:

{
    "name":  "MyProject",
    "version": "0.0.1",
    "devDependencies": {
        "jquery": "~2.1.0"
    }
}

When I run bower install from the directory where my bower.json file is located, I get the following error:

bower                       EMALFORMED Failed to read C:\Projects\MyProject\bower.json

What am I doing wrong? I keep looking for something to be syntactically incorrect. However, everything looks correct to me. Thank you so much for your help!

Upvotes: 0

Views: 1714

Answers (2)

Mangled Deutz
Mangled Deutz

Reputation: 11403

Since you are on windows, it's quite likely you are having issue with a BOM and/or another utf8/utf16 encoding issue.

Take a look here

Try again with a text editor that doesn't do stupid things (maybe Sublime Text - I'm not too sure what's good on windows).

Upvotes: 5

Vamsi
Vamsi

Reputation: 9780

Seems like unsolved bug

see link: https://github.com/bower/bower/issues/783

Try using this

{
    "name":  "MyProject",
    "version": "0.0.1",
    "dependencies": {
        "jquery": "~2.1.0"
    }
}

if this didn't work try updating your bower using npm update -g bower

Upvotes: 1

Related Questions