@julian, yeah, @planner died and reincarnated as @finid
I actually started on that step-wise upgrade path, but had to attend to other matters before I could post the result of my efforts.
Upgrading from 0.4.x to 0.5.x completed successfully. However, trying to go from 0.5.x to 0.6.x failed with the error shown in the code block below:
npm ERR! install Couldn't read dependencies
npm ERR! Failed to parse json
npm ERR! Unexpected token <
npm ERR! File: /var/www/sites/forum/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! System Linux 3.13.0-52-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/sites/forum
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! file /var/www/sites/forum/package.json
npm ERR! code EJSONPARSE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/sites/forum/npm-debug.log
npm ERR! not ok code 0
npm ERR! Failed to parse json
npm ERR! Unexpected token <
npm ERR! File: /var/www/sites/forum/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! System Linux 3.13.0-52-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "i" "nodebb-theme-vanilla" "nodebb-theme-lavender" "nodebb-widget-essentials"
npm ERR! cwd /var/www/sites/forum
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! file /var/www/sites/forum/package.json
npm ERR! code EJSONPARSE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/sites/forum/npm-debug.log
npm ERR! not ok code 0
Apparently, package.json
got so mangled that it was causing the upgrade to fail.
Heer's what the file looks like:
{
"name": "nodebb",
"license": "GPLv3 or later",
"description": "NodeBB Forum",
<<<<<<< HEAD
"version": "0.6.1",
=======
"version": "0.5.7",
>>>>>>> origin/v0.5.x
"homepage": "http://www.nodebb.org",
"repository": {
"type": "git",
"url": "https://github.com/NodeBB/NodeBB/"
},
"main": "app.js",
"scripts": {
"start": "./nodebb start",
"stop": "./nodebb stop",
"test": "mocha ./tests -t 10000"
},
"dependencies": {
"async": "~0.9.0",
"bcryptjs": "~2.1.0",
"body-parser": "^1.9.0",
"compression": "^1.1.0",
"connect-ensure-login": "^0.1.1",
"connect-flash": "^0.1.1",
"connect-multiparty": "^1.2.4",
"cookie-parser": "^1.3.3",
"cron": "^1.0.5",
"csurf": "^1.6.1",
"daemon": "~1.1.0",
"express": "^4.9.5",
"express-session": "^1.8.2",
"gm": "1.17.0",
"gravatar": "^1.1.0",
"heapdump": "^0.3.0",
"less": "^2.0.0",
"logrotate-stream": "^0.2.3",
"mkdirp": "~0.5.0",
"morgan": "^1.3.2",
"nconf": "~0.7.1",
"nodebb-plugin-dbsearch": "^0.1.0",
"nodebb-plugin-markdown": "^0.8.0",
"nodebb-plugin-mentions": "^0.9.0",
"nodebb-plugin-soundpack-default": "~0.1.1",
<<<<<<< HEAD
"nodebb-plugin-spam-be-gone": "^0.4.0",
"nodebb-theme-lavender": "^0.2.0",
"nodebb-theme-vanilla": "^0.2.0",
"nodebb-widget-essentials": "~0.2.0",
=======
"nodebb-theme-lavender": "0.1.13",
"nodebb-theme-vanilla": "0.1.30",
"nodebb-widget-essentials": "~0.1.1",
>>>>>>> origin/v0.5.x
"npm": "^2.1.4",
"passport": "^0.2.1",
"passport-local": "1.0.0",
"prompt": "^0.2.14",
"request": "^2.44.0",
"rimraf": "~2.2.6",
"rss": "^1.0.0",
"semver": "^4.0.3",
"serve-favicon": "^2.1.5",
"sitemap": "^0.7.4",
"socket.io": "^1.2.1",
"socket.io-client": "^1.2.1",
"socket.io-redis": "^0.1.3",
"socketio-wildcard": "~0.1.1",
"string": "^3.0.0",
"templates.js": "^0.1.12",
"uglify-js": "git+https://github.com/julianlam/UglifyJS2.git",
"underscore": "~1.7.0",
"validator": "~3.28.0",
"winston": "^0.9.0",
"xregexp": "~2.0.0"
},
"devDependencies": {
"mocha": "~1.13.0"
},
"bugs": {
"url": "https://github.com/NodeBB/NodeBB/issues"
},
"engines": {
"node": ">=0.10"
},
"maintainers": [
{
"name": "Andrew Rodrigues",
"email": "[email protected]",
"url": "https://github.com/psychobunny"
},
{
"name": "Julian Lam",
"email": "[email protected]",
"url": "https://github.com/julianlam"
},
{
"name": "Barış Soner Uşaklı",
"email": "[email protected]",
"url": "https://github.com/barisusakli"
}
]
}
Tried to use http://jsonlint.com, but there were key-value pairs that I could not get right.
Is there a version of package.json
I could pull or could you take a stab at helping validate it?