I'm following the steps from here https://babeljs.io/setup#installation.
I create a package.json file and then run
npm install --save-dev babel-cli
I get the error:
npm ERR! Darwin 17.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--
save-dev" "babel-cli"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! file /Users/name/Desktop/Graphs/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /Users/name/Desktop/Graphs/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file.
JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /Users/name/Desktop/Graphs/npm-debug.log
I've tried
npm cache clear
and
npm update
But it still doesn't work. Any ideas?