Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

package.json must be actual JSON, not just JavaScript

I used http://jsonlint.com/ to check the syntax for this package.json file

{
  "name": "hello-world",
  "description": "hello world test app",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": “4.6.1"
  }
}

it returns the error

Parse error on line 7:
...        "express": “4.6.1"  }}
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['

not sure what is wrong with this. terminal is throwing the error for using npm install

"Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript."
like image 983
nmolloy93 Avatar asked Sep 04 '25 16:09

nmolloy93


1 Answers

Just type npm cache clean on prompt and all the things must to work again.

like image 89
Eduardo Raupp Pereira Avatar answered Sep 07 '25 16:09

Eduardo Raupp Pereira