diff --git a/src/utils.js b/src/utils.js index 55d3b5e793..abc7a92e2a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -42,7 +42,19 @@ utils.secureRandom = function (low, high) { }; utils.getSass = function () { - if (process.platform === 'freebsd') { + // https://github.com/NodeBB/NodeBB/issues/11606 + function isMusl() { + if (process.platform !== 'linux') { + return false; + } + + try { + return !process.report.getReport().header.glibcVersionRuntime; + } catch { + return true; + } + } + if (process.platform === 'freebsd' || isMusl()) { return require('sass'); } try {