Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
geta-prettier-config (default)
✓ In package.json: "prettier": "geta-prettier-config"
✗ In package.json: "prettier": "./node_modules/geta-prettier-config"
Prettier resolves the package name automatically; no need for a full path.
require (CommonJS)
✓ const config = require('geta-prettier-config');
✗ const config = require('geta-prettier-config').default;
The package exports a plain object, not a default export. No .default needed.
import (ESM)
✓ import config from 'geta-prettier-config';
✗ import { config } from 'geta-prettier-config';
The package uses module.exports = {...}, so default import works in ESM. Named import would fail.
prettier.config.js / .prettierrc.js
✓ module.exports = require('geta-prettier-config');
✗ module.exports = { ...require('geta-prettier-config') };
// or
module.exports = getaPrettierConfig;
Simply re-export the required object; spreading or renaming is unnecessary.
Install and use the shared Prettier config by adding a string reference to package.json or using require in a config file.
// 1. Install the package and prettier
// npm install --save-dev prettier geta-prettier-config
// 2. In package.json, add:
// "prettier": "geta-prettier-config"
// 3. Or create a prettier.config.js:
module.exports = require('geta-prettier-config');
// 4. Format all files:
// npx prettier --check .
// npx prettier --write .
Errors
Common errors & fixes
Error: Cannot find module 'geta-prettier-config'
Package not installed or not in node_modules.
fixRun: npm install --save-dev geta-prettier-config
prettier: Invalid configuration file: module.exports = require('geta-prettier-config'); TypeError: geta-prettier-config is not a function
Attempted to call the config as a function instead of using require.
fixRemove parentheses: module.exports = require('geta-prettier-config'); Audit
Dependencies
No dependency data recorded yet.