From ecca6422b985227cde088ea8fc992224bf413735 Mon Sep 17 00:00:00 2001 From: Seyed Sadeq Shobeiry Date: Fri, 4 Jul 2025 18:04:14 +0330 Subject: [PATCH] fix: fix error __dirname is not defined --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7fd5bde..506e220 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ 'use strict'; var lib = require('./lib/app-root-path.js'); -module.exports = lib(__dirname); \ No newline at end of file +module.exports = lib(typeof __dirname === "undefined" ? process.cwd() : __dirname); \ No newline at end of file