EMALFORMED error when trying to register bower.json file

后端 未结 3 622
忘了有多久
忘了有多久 2020-12-11 17:36

I\'m having trouble registering my bower.json file at Bower. Any help would be greatly appreciated.

When I try to register my project at Bower using

         


        
相关标签:
3条回答
  • 2020-12-11 18:08

    I fixed this problem by opening the file with vim and saving with no bomb.

    :setlocal nobomb 
    :w 
    
    0 讨论(0)
  • 2020-12-11 18:28

    The problem was caused by the encoding of my bower.json file. However, removing the BOM wasn't enough - UTF8 (without BOM) was accepted. Instead, I had to use ASCII encoding.

    0 讨论(0)
  • 2020-12-11 18:34

    Your bower json file (as visible here: https://raw.github.com/mperdeck/jsnlog.js/2.4.3/bower.json) contains a leading invisible unicode character (likely a BOM).

    This is visible in curl output: curl https://raw.github.com/mperdeck/jsnlog.js/2.4.3/bower.json

    Start your bower.json file over from scratch, and use an editor that doesn't add crap :-).

    0 讨论(0)
提交回复
热议问题