$60 GRAYBYTE WORDPRESS FILE MANAGER $15

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils/

HOME
Current File : /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils//explain-eresolve.js
// this is called when an ERESOLVE error is caught in the exit-handler,
// or when there's a log.warn('eresolve', msg, explanation), to turn it
// into a human-intelligible explanation of what's wrong and how to fix.
const { explainEdge, explainNode, printNode } = require('./explain-dep.js')

// expl is an explanation object that comes from Arborist.  It looks like:
// Depth is how far we want to want to descend into the object making a report.
// The full report (ie, depth=Infinity) is always written to the cache folder
// at ${cache}/eresolve-report.txt along with full json.
const explain = (expl, chalk, depth) => {
  const { edge, dep, current, peerConflict, currentEdge } = expl

  const out = []
  const whileInstalling = dep && dep.whileInstalling ||
    current && current.whileInstalling ||
    edge && edge.from && edge.from.whileInstalling
  if (whileInstalling) {
    out.push('While resolving: ' + printNode(whileInstalling, chalk))
  }

  // it "should" be impossible for an ERESOLVE explanation to lack both
  // current and currentEdge, but better to have a less helpful error
  // than a crashing failure.
  if (current) {
    out.push('Found: ' + explainNode(current, depth, chalk))
  } else if (peerConflict && peerConflict.current) {
    out.push('Found: ' + explainNode(peerConflict.current, depth, chalk))
  } else if (currentEdge) {
    out.push('Found: ' + explainEdge(currentEdge, depth, chalk))
  } else /* istanbul ignore else - should always have one */ if (edge) {
    out.push('Found: ' + explainEdge(edge, depth, chalk))
  }

  out.push('\nCould not resolve dependency:\n' +
    explainEdge(edge, depth, chalk))

  if (peerConflict) {
    const heading = '\nConflicting peer dependency:'
    const pc = explainNode(peerConflict.peer, depth, chalk)
    out.push(heading + ' ' + pc)
  }

  return out.join('\n')
}

// generate a full verbose report and tell the user how to fix it
const report = (expl, chalk, noColor) => {
  const flags = [
    expl.strictPeerDeps ? '--no-strict-peer-deps' : '',
    '--force',
    '--legacy-peer-deps',
  ].filter(Boolean)

  const or = (arr) => arr.length <= 2
    ? arr.join(' or ') :
    arr.map((v, i, l) => i + 1 === l.length ? `or ${v}` : v).join(', ')

  const fix = `Fix the upstream dependency conflict, or retry
this command with ${or(flags)}
to accept an incorrect (and potentially broken) dependency resolution.`

  return {
    explanation: `${explain(expl, chalk, 4)}\n\n${fix}`,
    file: `# npm resolution error report\n\n${explain(expl, noColor, Infinity)}\n\n${fix}`,
  }
}

module.exports = {
  explain,
  report,
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
completion
--
3 Mar 2024 10.54 PM
root / root
0755
config
--
3 Mar 2024 10.54 PM
root / root
0755
ansi-trim.js
0.169 KB
6 Dec 2023 6.07 PM
root / root
0644
audit-error.js
1.016 KB
6 Dec 2023 6.07 PM
root / root
0644
auth.js
2.804 KB
6 Dec 2023 6.07 PM
root / root
0644
cmd-list.js
2.163 KB
6 Dec 2023 6.07 PM
root / root
0644
completion.fish
1.559 KB
6 Dec 2023 6.07 PM
root / root
0644
completion.sh
1.854 KB
6 Dec 2023 6.07 PM
root / root
0755
did-you-mean.js
1.463 KB
6 Dec 2023 6.07 PM
root / root
0644
display.js
3.434 KB
6 Dec 2023 6.07 PM
root / root
0644
error-message.js
13.532 KB
6 Dec 2023 6.07 PM
root / root
0644
exit-handler.js
6.739 KB
6 Dec 2023 6.07 PM
root / root
0644
explain-dep.js
3.5 KB
6 Dec 2023 6.07 PM
root / root
0644
explain-eresolve.js
2.546 KB
6 Dec 2023 6.07 PM
root / root
0644
format-bytes.js
0.614 KB
6 Dec 2023 6.07 PM
root / root
0644
format-search-stream.js
3.929 KB
6 Dec 2023 6.07 PM
root / root
0644
get-identity.js
0.783 KB
6 Dec 2023 6.07 PM
root / root
0644
is-windows.js
0.228 KB
6 Dec 2023 6.07 PM
root / root
0644
log-file.js
7.032 KB
6 Dec 2023 6.07 PM
root / root
0644
log-shim.js
1.678 KB
6 Dec 2023 6.07 PM
root / root
0644
npm-usage.js
2.041 KB
6 Dec 2023 6.07 PM
root / root
0644
open-url-prompt.js
1.438 KB
6 Dec 2023 6.07 PM
root / root
0644
open-url.js
1.088 KB
6 Dec 2023 6.07 PM
root / root
0644
otplease.js
1.229 KB
6 Dec 2023 6.07 PM
root / root
0644
ping.js
0.246 KB
6 Dec 2023 6.07 PM
root / root
0644
pulse-till-done.js
0.402 KB
6 Dec 2023 6.07 PM
root / root
0644
queryable.js
9.558 KB
6 Dec 2023 6.07 PM
root / root
0644
read-user-info.js
1.996 KB
6 Dec 2023 6.07 PM
root / root
0644
reify-finish.js
0.855 KB
6 Dec 2023 6.07 PM
root / root
0644
reify-output.js
4.968 KB
6 Dec 2023 6.07 PM
root / root
0644
replace-info.js
0.788 KB
6 Dec 2023 6.07 PM
root / root
0644
tar.js
3.899 KB
6 Dec 2023 6.07 PM
root / root
0644
timers.js
2.731 KB
6 Dec 2023 6.07 PM
root / root
0644
update-notifier.js
4.188 KB
6 Dec 2023 6.07 PM
root / root
0644
validate-lockfile.js
0.999 KB
6 Dec 2023 6.07 PM
root / root
0644
web-auth.js
0.545 KB
6 Dec 2023 6.07 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF