diff --git a/lib/client/hashauth.js b/lib/client/hashauth.js index 99d867e9212..1f9b101877a 100644 --- a/lib/client/hashauth.js +++ b/lib/client/hashauth.js @@ -85,7 +85,7 @@ hashauth.init = function init (client, $) { client.browserUtils.reload(); } - // clear eveything just in case + // clear everything just in case hashauth.apisecret = null; hashauth.apisecrethash = null; hashauth.authenticated = false; diff --git a/lib/server/app.js b/lib/server/app.js index bb68a2f711a..6a67bcf8c73 100644 --- a/lib/server/app.js +++ b/lib/server/app.js @@ -17,6 +17,8 @@ function resolvePath(filePath) { if (fs.existsSync(p)) return p; p = path.join(process.cwd(), filePath); if (fs.existsSync(p)) return p; + p = path.join(__dirname, '../../', filePath); + if (fs.existsSync(p)) return p; return require.resolve(filePath); } diff --git a/lib/server/bootevent.js b/lib/server/bootevent.js index e97e2bc6258..6961673a646 100644 --- a/lib/server/bootevent.js +++ b/lib/server/bootevent.js @@ -34,8 +34,8 @@ function boot (env, language) { var nodeVersion = process.version; const isLTS = process.release.lts ? true : false; - - if (isLTS && (semver.satisfies(nodeVersion, '^14.0.0') || semver.satisfies(nodeVersion, '^12.0.0') || semver.satisfies(nodeVersion, '^10.0.0'))) { + + if (isLTS && (semver.satisfies(nodeVersion, '^16.0.0') || semver.satisfies(nodeVersion, '^14.0.0') || semver.satisfies(nodeVersion, '^12.0.0') || semver.satisfies(nodeVersion, '^10.0.0'))) { //Latest Node 10 LTS and Node 12 LTS are recommended and supported. //Require at least Node 8 LTS and Node 10 LTS without known security issues console.debug('Node LTS version ' + nodeVersion + ' is supported'); @@ -266,7 +266,7 @@ function boot (env, language) { function setupListeners (ctx, next) { console.log('Executing setupListeners'); - + if (hasBootErrors(ctx)) { return next(); } diff --git a/package.json b/package.json index 2a267345494..2c7a91a0106 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nightscout", "version": "14.2.6", - "description": "Nightscout acts as a web-based CGM (Continuous Glucose Montinor) to allow multiple caregivers to remotely view a patients glucose data in realtime.", + "description": "Nightscout acts as a web-based CGM (Continuous Glucose Monitor) to allow multiple caregivers to remotely view a patients glucose data in realtime.", "license": "AGPL-3.0", "author": "Nightscout Team", "homepage": "http://nightscout.github.io/", @@ -157,6 +157,7 @@ "webpack-bundle-analyzer": "^4.4.0", "webpack-dev-middleware": "^4.1.0", "webpack-hot-middleware": "^2.25.0", + "vm-browserify": "^1.1.2", "xml2js": "^0.4.23" }, "browserslist": "> 0.25%, not dead, ios_saf 10" diff --git a/webpack/webpack.config.js b/webpack/webpack.config.js index a81a2f17dcf..5329894adb0 100644 --- a/webpack/webpack.config.js +++ b/webpack/webpack.config.js @@ -56,6 +56,10 @@ pluginArray.push(new webpack.ProvidePlugin({ process: 'process/browser', })); +pluginArray.push(new webpack.ProvidePlugin({ + Buffer: ['buffer', 'Buffer'], +})); + // limit Timezone data from Moment pluginArray.push(new MomentTimezoneDataPlugin({ @@ -106,7 +110,7 @@ const rules = [ loader: 'file-loader', options: { outputPath: 'images' - //the images will be emmited to public/assets/images/ folder + //the images will be emitted to public/assets/images/ folder //the images will be put in the DOM