I want to npm install the following validate .json
{
"name": "node-todo",
"version": "0.0.0",
"description": "Simple todo application",
"main": "server.js",
"dependencies": {
"express": "~3.4.4",
"mongoose": "~3.6.2"
},
"private": true
}
but the npm install doesn't seem to work because I even cant npm install a sample json from http://package-json-validator.com/
I installed npm and nodejs with the following commands
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
Now I want to use npm install but the shell gives me this npm ERR! install Couldn't read dependencies npm ERR! Failed to parse json npm ERR! Unexpected token / 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! System Darwin 13.0.0
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code EJSONPARSE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0
I'm using Sublime and saved the json as a UTF-8 (without the BOM tag)