{"library":"app-root-dir","type":"library","category":null,"description":"App Root Dir is a minimalist Node.js module designed to infer the root directory of the currently running application. Published as version 1.0.2 over a decade ago (last updated in 2015), this package is no longer actively maintained. It employs a heuristic based on the presence of `package.json` at `process.cwd()` or by traversing `node_modules` paths to identify the project root. Its primary functions are `get()` to retrieve the root directory and `set()` to manually configure it, notably using a global variable, which can lead to unexpected side effects. Due to its age, it exclusively supports CommonJS and lacks native ESM support or adaptations for modern development practices like monorepos or bundled applications, where its heuristic may prove unreliable. For new projects, actively maintained alternatives that provide more robust and configurable root path resolution, including ESM compatibility and TypeScript types, are strongly recommended.","language":"javascript","status":"abandoned","version":"1.0.2","tags":["javascript","modules","path","node","app","root","directory"],"last_verified":"Wed May 27","install":[{"cmd":"npm install app-root-dir","imports":["const appRootDir = require('app-root-dir');","const rootPath = require('app-root-dir').get();","require('app-root-dir').set(__dirname);"]},{"cmd":"yarn add app-root-dir","imports":[]},{"cmd":"pnpm add app-root-dir","imports":[]}],"homepage":null,"github":"https://github.com/philidem/node-app-root-dir","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/app-root-dir","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/app-root-dir/compatibility"}}