mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 07:40:43 +01:00
Partial fix #5538
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user