PHP 8.2.30
Preview: npm-prefix.js Size: 856 B
/proc/thread-self/root/proc/thread-self/root/opt/alt/alt-nodejs20/root/lib/node_modules/npm/bin/npm-prefix.js

#!/opt/alt/alt-nodejs20/root/usr/bin/node
// This is a single-use bin to help windows discover the proper prefix for npm
// without having to load all of npm first
// It does not accept argv params

const path = require('node:path')
const Config = require('@npmcli/config')
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions')
const config = new Config({
  npmPath: path.dirname(__dirname),
  // argv is explicitly not looked at since prefix is not something that can be changed via argv
  argv: [],
  definitions,
  flatten,
  shorthands,
  excludeNpmCwd: false,
})

async function main () {
  try {
    await config.load()
    // eslint-disable-next-line no-console
    console.log(config.globalPrefix)
  } catch (err) {
    // eslint-disable-next-line no-console
    console.error(err)
    process.exit(1)
  }
}
main()

Directory Contents

Dirs: 1 × Files: 9

Name Size Perms Modified Actions
- drwxr-xr-x 2026-03-14 07:02:08
Edit Download
2.02 KB lrwxr-xr-x 2026-02-23 03:24:40
Edit Download
76 B lrwxr-xr-x 2026-02-23 03:24:40
Edit Download
856 B lrwxr-xr-x 2026-02-23 03:24:40
Edit Download
538 B lrw-r--r-- 2026-02-23 03:24:40
Edit Download
763 B lrw-r--r-- 2026-02-23 03:24:40
Edit Download
2.02 KB lrwxr-xr-x 2026-02-23 03:24:40
Edit Download
2.87 KB lrwxr-xr-x 2026-02-23 03:24:40
Edit Download
538 B lrw-r--r-- 2026-02-23 03:24:40
Edit Download
763 B lrw-r--r-- 2026-02-23 03:24:40
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).