Sunday, January 17, 2016

Bower Tips: Fix Syntax Error in bower.json

Bower is a famous package manager in now a days.
Sometimes while restoring the packages it gives “Malformed bower.json” error. 
Once error occurred most of times we only consider the bower config file which added in to the project. However while we adding package to the project it creates its own bower.json file and .bower.json file inside the package. If one of those files are malformed then it gives same malformed error while restoring the packages or while restoring dependencies. Due to that reason we need to check automatically added bower files to identify the root cause of the error. Those automatically added files may be hidden in the solution explorer.




How to fix the error
  • If you use visual studio read error output carefully and it mentioned the bower file need to correct.


  •  Open relevant bower file




  • Remove unwanted content from it (all other content which located after main curly braces) and save it then it will fix the Dependency error instantly.