v1.18.x
Peter Jaszkowiak 8 years ago
parent a450cb869d
commit 57696b22f4

@ -166,7 +166,7 @@
};
module.checkCompatibility = function (callback) {
var mongoPkg = require.main.require('./node_modules/mongodb/package.json');
var mongoPkg = require('mongodb/package.json');
if (semver.lt(mongoPkg.version, '2.0.0')) {
return callback(new Error('The `mongodb` package is out-of-date, please run `./nodebb setup` again.'));

@ -1,5 +1,6 @@
'use strict';
var path = require('path');
var winston = require('winston');
var nconf = require('nconf');
var async = require('async');
@ -83,7 +84,7 @@ function resetTheme(themeId, callback) {
var meta = require('./meta');
var fs = require('fs');
fs.access('node_modules/' + themeId + '/package.json', function (err) {
fs.access(path.join(__dirname, '../node_modules', themeId, 'package.json'), function (err) {
if (err) {
winston.warn('[reset] Theme `%s` is not installed on this forum', themeId);
callback(new Error('theme-not-found'));

Loading…
Cancel
Save