diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js index fde793fc48ab7..7f9aca95ef39c 100644 --- a/lib/utils/error-message.js +++ b/lib/utils/error-message.js @@ -4,11 +4,18 @@ const { format } = require('util') const { resolve } = require('path') const nameValidator = require('validate-npm-package-name') const npmlog = require('npmlog') +const { report: explainEresolve } = require('./explain-eresolve.js') module.exports = (er) => { const short = [] const detail = [] switch (er.code) { + case 'ERESOLVE': + short.push(['ERESOLVE', er.message]) + detail.push(['', '']) + detail.push(['', explainEresolve(er)]) + break + case 'ENOLOCK': { const cmd = npm.command || '' short.push([cmd, 'This command requires an existing lockfile.']) diff --git a/lib/utils/explain-eresolve.js b/lib/utils/explain-eresolve.js new file mode 100644 index 0000000000000..65d73606e52c0 --- /dev/null +++ b/lib/utils/explain-eresolve.js @@ -0,0 +1,146 @@ +// this is called when an ERESOLVE error is caught in the error-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. +// +// TODO: abstract out the explainNode methods into a separate util for +// use by a future `npm explain ` command. + +const npm = require('../npm.js') +const { writeFileSync } = require('fs') +const { resolve } = require('path') + +const chalk = require('chalk') +const nocolor = { + bold: s => s, + dim: s => s +} + +// expl is an explanation object that comes from Arborist. It looks like: +// { +// dep: { +// whileInstalling: { +// explanation of the thing being installed when we hit the conflict +// }, +// name, +// version, +// dependents: [ +// things depending on this node (ie, reason for inclusion) +// { name, version, dependents }, ... +// ] +// } +// current: { +// explanation of the current node that already was in the tree conflicting +// } +// peerConflict: { +// explanation of the peer dependency that couldn't be added, or null +// } +// fixWithForce: Boolean - can we use --force to push through this? +// type: type of the edge that couldn't be met +// isPeer: true if the edge that couldn't be met is a peer dependency +// } +// 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 explainEresolve = (expl, color, depth) => { + const { dep, current, peerConflict } = expl + + const out = [] + /* istanbul ignore else - should always have this for ERESOLVEs */ + if (dep.whileInstalling) { + out.push('While resolving: ' + printNode(dep.whileInstalling, color)) + } + + out.push(explainNode('Found:', current, depth, color)) + + out.push(explainNode('\nCould not add conflicting dependency:', dep, depth, color)) + + if (peerConflict) { + const heading = '\nConflicting peer dependency:' + const pc = explainNode(heading, peerConflict, depth, color) + out.push(pc) + } + + return out.join('\n') +} + +const explainNode = (heading, node, depth, color) => + `${heading} ${printNode(node, color)}` + + explainDependents(node, depth, color) + +const printNode = ({ name, version, location }, color) => { + const { bold, dim } = color ? chalk : nocolor + return `${bold(name)}@${bold(version)}` + + (location ? dim(` at ${location}`) : '') +} + +const explainDependents = ({name, dependents}, depth, color) => { + if (!dependents || !dependents.length || depth <= 0) + return '' + + const max = Math.ceil(depth / 2) + const messages = dependents.slice(0, max) + .map(dep => explainDependency(name, dep, depth, color)) + + // show just the names of the first 5 deps that overflowed the list + if (dependents.length > max) { + const names = dependents.slice(max).map(d => d.from.name) + const showNames = names.slice(0, 5) + if (showNames.length < names.length) + showNames.push('...') + const show = `(${showNames.join(', ')})` + messages.push(`${names.length} more ${show}`) + } + + const str = '\nfor: ' + messages.join('\nand: ') + return str.split('\n').join('\n ') +} + +const explainDependency = (name, {type, from, spec}, depth, color) => { + const { bold } = color ? chalk : nocolor + return `${type} dependency ` + + `${bold(name)}@"${bold(spec)}"\nfrom: ` + + explainFrom(from, depth, color) +} + +const explainFrom = (from, depth, color) => { + if (!from.name && !from.version) { + return 'the root project' + } + + return printNode(from, color) + + explainDependents(from, depth - 1, color) +} + +// generate a full verbose report and tell the user how to fix it +const report = (expl, depth = 4) => { + const fullReport = resolve(npm.cache, 'eresolve-report.txt') + + const orForce = expl.fixWithForce ? ' or --force' : '' + const fix =`Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps${orForce} +to accept an incorrect (and potentially broken) dependency resolution.` + + writeFileSync(fullReport, `# npm resolution error report + +${new Date().toISOString()} + +${explainEresolve(expl, false, Infinity)} + +${fix} + +Raw JSON explanation object: + +${JSON.stringify(expl, null, 2)} +`, 'utf8') + + return explainEresolve(expl, npm.color, depth) + + `\n\n${fix}\n\nSee ${fullReport} for a full report.` +} + +// the terser explain method for the warning when using --force +const explain = (expl, depth = 2) => explainEresolve(expl, npm.color, depth) + +module.exports = { + explain, + report +} diff --git a/lib/utils/setup-log.js b/lib/utils/setup-log.js index 9e845de0e2310..dde55b4facafc 100644 --- a/lib/utils/setup-log.js +++ b/lib/utils/setup-log.js @@ -1,10 +1,27 @@ // module to set the appropriate log settings based on configs // returns a boolean to say whether we should enable color on // stdout or not. +// +// Also (and this is a really inexcusable kludge), we patch the +// log.warn() method so that when we see a peerDep override +// explanation from Arborist, we can replace the object with a +// highly abbreviated explanation of what's being overridden. const log = require('npmlog') +const { explain } = require('./explain-eresolve.js') + module.exports = (config) => { const color = config.get('color') + const { warn } = log + + log.warn = (heading, ...args) => { + if (heading === 'ERESOLVE' && args[1] && typeof args[1] === 'object') { + warn(heading, args[0]) + return warn('', explain(args[1])) + } + return warn(heading, ...args) + } + if (config.get('timing') && config.get('loglevel') === 'notice') { log.level = 'timing' } else { diff --git a/tap-snapshots/test-lib-utils-error-message.js-TAP.test.js b/tap-snapshots/test-lib-utils-error-message.js-TAP.test.js index 9f64b3d037ae2..921cc06b99aa4 100644 --- a/tap-snapshots/test-lib-utils-error-message.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-error-message.js-TAP.test.js @@ -782,6 +782,27 @@ Object { } ` +exports[`test/lib/utils/error-message.js TAP explain ERESOLVE errors > must match snapshot 1`] = ` +Object { + "detail": Array [ + Array [ + "", + "", + ], + Array [ + "", + "explanation", + ], + ], + "summary": Array [ + Array [ + "ERESOLVE", + "could not resolve", + ], + ], +} +` + exports[`test/lib/utils/error-message.js TAP just simple messages > must match snapshot 1`] = ` Object { "detail": Array [], diff --git a/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js b/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js new file mode 100644 index 0000000000000..60594e5497f55 --- /dev/null +++ b/tap-snapshots/test-lib-utils-explain-eresolve.js-TAP.test.js @@ -0,0 +1,999 @@ +/* IMPORTANT + * This snapshot file is auto-generated, but designed for humans. + * It should be checked into source control and tracked carefully. + * Re-generate by setting TAP_SNAPSHOT=1 and running tests. + * Make sure to inspect the output below. Do not ignore changes! + */ +'use strict' +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > explain with color 1`] = ` +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a +` + +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > explain with no color, depth of 6 1`] = ` +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project +` + +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report 1`] = ` +# npm resolution error report + +\${TIME} + +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +Raw JSON explanation object: + +{ + "name": "cycleNested", + "json": true +} + +` + +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with color 1`] = ` +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with color, depth only 2 1`] = ` +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP cycleNested > report with no color, depth of 6 1`] = ` +While resolving: @isaacs/peer-dep-cycle-a@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Conflicting peer dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > explain with color 1`] = ` +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 26 more (react-dom, @reach/router, gatsby-cli, gatsby-link, gatsby-react-router-scroll, ...) + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > explain with no color, depth of 6 1`] = ` +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: react-dom@16.13.1 at node_modules/react-dom + for: peer dependency react-dom@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 1 more (gatsby-react-router-scroll) + and: peer dependency react-dom@"^16.4.2" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 2 more (gatsby-react-router-scroll, react-hot-loader) + and: peer dependency react@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.0.0" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 24 more (gatsby-cli, gatsby-link, gatsby-react-router-scroll, react-hot-loader, create-react-context, ...) + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report 1`] = ` +# npm resolution error report + +\${TIME} + +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: react-dom@16.13.1 at node_modules/react-dom + for: peer dependency react-dom@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.0.0" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"^16.4.2" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"^16.4.2" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"^15.0.0 || ^16.0.0" + from: react-hot-loader@4.12.21 at node_modules/react-hot-loader + for: prod dependency react-hot-loader@"^4.12.21" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.0.0" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: prod dependency react@"^16.8.0" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.4.2" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.4.2" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^15.0.0 || ^16.0.0" + from: react-hot-loader@4.12.21 at node_modules/react-hot-loader + for: prod dependency react-hot-loader@"^4.12.21" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^0.14.0 || ^15.0.0 || ^16.0.0" + from: create-react-context@0.3.0 at node_modules/create-react-context + for: prod dependency create-react-context@"0.3.0" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.0.0" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.12.0" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.8.0" + from: ink@2.7.1 at node_modules/ink + for: prod dependency ink@"^2.7.1" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency ink@"^2.0.0" + from: ink-spinner@3.1.0 at node_modules/ink-spinner + for: prod dependency ink-spinner@"^3.1.0" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency ink@">=2.0.0" + from: ink-box@1.0.0 at node_modules/ink-box + for: prod dependency ink-box@"^1.0.0" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.8.2" + from: ink-spinner@3.1.0 at node_modules/ink-spinner + for: prod dependency ink-spinner@"^3.1.0" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.3.0" + from: @emotion/core@10.0.35 at node_modules/@emotion/core + for: prod dependency @emotion/core@"^10.0.14" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/core@"^10.0.27" + from: @emotion/styled@10.0.27 at node_modules/@emotion/styled + for: prod dependency @emotion/styled@"^10.0.14" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/styled@"^10.0.14" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/core@"^10.0.14" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/core@"^10.0.28" + from: @emotion/styled-base@10.0.31 at node_modules/@emotion/styled-base + for: prod dependency @emotion/styled-base@"^10.0.27" + from: @emotion/styled@10.0.27 at node_modules/@emotion/styled + for: prod dependency @emotion/styled@"^10.0.14" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/styled@"^10.0.14" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.3.0" + from: @emotion/styled@10.0.27 at node_modules/@emotion/styled + for: prod dependency @emotion/styled@"^10.0.14" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/styled@"^10.0.14" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: @mdx-js/react@2.0.0-next.7 at node_modules/@mdx-js/react + for: prod dependency @mdx-js/react@"^2.0.0-next.4" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: prod dependency @mdx-js/react@"^2.0.0-next.7" + from: @mdx-js/runtime@2.0.0-next.7 at node_modules/@mdx-js/runtime + for: prod dependency @mdx-js/runtime@"^2.0.0-next.4" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: @mdx-js/runtime@2.0.0-next.7 at node_modules/@mdx-js/runtime + for: prod dependency @mdx-js/runtime@"^2.0.0-next.4" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.8.0" + from: formik@2.1.5 at node_modules/formik + for: prod dependency formik@"^2.0.8" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency formik@"^2.0.8" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.4.2" + from: gatsby@2.6.0 at node_modules/gatsby-recipes/node_modules/gatsby + for: peer dependency gatsby@"2.6.0" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.0.0" + from: react-dom@16.8.1 at node_modules/gatsby-recipes/node_modules/react-dom + for: peer dependency react-dom@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"^16.4.2" + from: gatsby@2.6.0 at node_modules/gatsby-recipes/node_modules/gatsby + for: peer dependency gatsby@"2.6.0" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"^0.14.0 || ^15.0.0 || ^16.0.0" + from: gatsby-react-router-scroll@2.3.1 at node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^2.0.7" + from: gatsby@2.6.0 at node_modules/gatsby-recipes/node_modules/gatsby + for: peer dependency gatsby@"2.6.0" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"*" + from: react-icons@3.11.0 at node_modules/react-icons + for: prod dependency react-icons@"^3.0.1" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-icons@"^3.2.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.8.0" + from: ink-box@1.0.0 at node_modules/ink-box + for: prod dependency ink-box@"^1.0.0" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^0.14.0 || ^15.0.0 || ^16.0.0" + from: react-circular-progressbar@2.0.3 at node_modules/react-circular-progressbar + for: prod dependency react-circular-progressbar@"^2.0.0" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: react-reconciler@0.25.1 at node_modules/react-reconciler + for: prod dependency react-reconciler@"^0.25.1" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">= 16.8.0" + from: urql@1.10.0 at node_modules/urql + for: prod dependency urql@"^1.9.7" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@">=16.3.0" + from: @emotion/styled-base@10.0.31 at node_modules/@emotion/styled-base + for: prod dependency @emotion/styled-base@"^10.0.27" + from: @emotion/styled@10.0.27 at node_modules/@emotion/styled + for: prod dependency @emotion/styled@"^10.0.14" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @emotion/styled@"^10.0.14" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.0.0" + from: react-reconciler@0.24.0 at node_modules/ink/node_modules/react-reconciler + for: prod dependency react-reconciler@"^0.24.0" + from: ink@2.7.1 at node_modules/ink + for: prod dependency ink@"^2.7.1" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency ink@"^2.0.0" + from: ink-spinner@3.1.0 at node_modules/ink-spinner + for: prod dependency ink-spinner@"^3.1.0" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency ink@">=2.0.0" + from: ink-box@1.0.0 at node_modules/ink-box + for: prod dependency ink-box@"^1.0.0" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^0.14.0 || ^15.0.0 || ^16.0.0" + from: gatsby-react-router-scroll@2.3.1 at node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^2.0.7" + from: gatsby@2.6.0 at node_modules/gatsby-recipes/node_modules/gatsby + for: peer dependency gatsby@"2.6.0" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: @mdx-js/react@1.6.16 at node_modules/gatsby-recipes/node_modules/gatsby-interface/node_modules/@mdx-js/react + for: prod dependency @mdx-js/react@"^1.5.2" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +Raw JSON explanation object: + +{ + "name": "gatsby", + "json": true +} + +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with color 1`] = ` +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: react-dom@16.13.1 at node_modules/react-dom + for: peer dependency react-dom@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 2 more (gatsby-link, gatsby-react-router-scroll) + and: 3 more (gatsby-link, gatsby-react-router-scroll, react-hot-loader) + and: 25 more (@reach/router, gatsby-cli, gatsby-link, gatsby-react-router-scroll, react-hot-loader, ...) + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with color, depth only 2 1`] = ` +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 26 more (react-dom, @reach/router, gatsby-cli, gatsby-link, gatsby-react-router-scroll, ...) + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP gatsby > report with no color, depth of 6 1`] = ` +While resolving: gatsby-interface@0.0.166 +Found: react@16.13.1 at node_modules/react + for: peer dependency react@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react@"^16.13.1" + from: react-dom@16.13.1 at node_modules/react-dom + for: peer dependency react-dom@"^16.4.2" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency react-dom@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 1 more (gatsby-react-router-scroll) + and: peer dependency react-dom@"^16.4.2" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 2 more (gatsby-react-router-scroll, react-hot-loader) + and: peer dependency react@"15.x || 16.x || 16.4.0-alpha.0911da3" + from: @reach/router@1.3.4 at node_modules/@reach/router + for: prod dependency @reach/router@"^1.3.4" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.3.3" + from: gatsby-link@2.4.13 at node_modules/gatsby-link + for: prod dependency gatsby-link@"^2.4.13" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: peer dependency @reach/router@"^1.0.0" + from: gatsby-react-router-scroll@3.0.12 at node_modules/gatsby-react-router-scroll + for: prod dependency gatsby-react-router-scroll@"^3.0.12" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + and: 24 more (gatsby-cli, gatsby-link, gatsby-react-router-scroll, react-hot-loader, create-react-context, ...) + +Could not add conflicting dependency: react@16.8.1 at node_modules/react + for: peer dependency react@"16.8.1" + from: gatsby-interface@0.0.166 at node_modules/gatsby-recipes/node_modules/gatsby-interface + for: prod dependency gatsby-interface@"^0.0.166" + from: gatsby-recipes@0.2.20 at node_modules/gatsby-recipes + for: prod dependency gatsby-recipes@"^0.2.20" + from: gatsby-cli@2.12.91 at node_modules/gatsby-cli + for: prod dependency gatsby-cli@"^2.12.91" + from: gatsby@2.24.53 at node_modules/gatsby + for: prod dependency gatsby@"" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > explain with color 1`] = ` +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > explain with no color, depth of 6 1`] = ` +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > report 1`] = ` +# npm resolution error report + +\${TIME} + +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +Raw JSON explanation object: + +{ + "name": "withShrinkwrap", + "json": true +} + +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > report with color 1`] = ` +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > report with color, depth only 2 1`] = ` +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` + +exports[`test/lib/utils/explain-eresolve.js TAP withShrinkwrap > report with no color, depth of 6 1`] = ` +While resolving: @isaacs/peer-dep-cycle-b@1.0.0 +Found: @isaacs/peer-dep-cycle-c@2.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: prod dependency @isaacs/peer-dep-cycle-c@"2.x" + from: the root project + +Could not add conflicting dependency: @isaacs/peer-dep-cycle-c@1.0.0 at node_modules/@isaacs/peer-dep-cycle-c + for: peer dependency @isaacs/peer-dep-cycle-c@"1" + from: @isaacs/peer-dep-cycle-b@1.0.0 at node_modules/@isaacs/peer-dep-cycle-b + for: peer dependency @isaacs/peer-dep-cycle-b@"1" + from: @isaacs/peer-dep-cycle-a@1.0.0 at node_modules/@isaacs/peer-dep-cycle-a + for: prod dependency @isaacs/peer-dep-cycle-a@"1.x" + from: the root project + +Fix the upstream dependency conflict, or retry +this command with --legacy-peer-deps or --force +to accept an incorrect (and potentially broken) dependency resolution. + +See \${REPORT} for a full report. +` diff --git a/test/fixtures/eresolve-explanations.js b/test/fixtures/eresolve-explanations.js new file mode 100644 index 0000000000000..3b1cd41a25ebe --- /dev/null +++ b/test/fixtures/eresolve-explanations.js @@ -0,0 +1,2576 @@ +// some real-world examples of ERESOLVE error explaination objects, +// copied from arborist or generated there. +module.exports = { + cycleNested: { + code: 'ERESOLVE', + dep: { + name: '@isaacs/peer-dep-cycle-b', + version: '1.0.0', + whileInstalling: { name: '@isaacs/peer-dep-cycle-a', version: '1.0.0' }, + location: 'node_modules/@isaacs/peer-dep-cycle-b', + dependents: [ + { + type: 'peer', + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-a', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-a', + dependents: [ + { + type: 'prod', + spec: '1.x', + from: { location: '/some/project' } + } + ] + } + } + ] + }, + current: { + name: '@isaacs/peer-dep-cycle-c', + version: '2.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-c', + dependents: [ + { + type: 'prod', + spec: '2.x', + from: { location: '/some/project' } + } + ] + }, + peerConflict: { + name: '@isaacs/peer-dep-cycle-c', + version: '1.0.0', + whileInstalling: { name: '@isaacs/peer-dep-cycle-a', version: '1.0.0' }, + location: 'node_modules/@isaacs/peer-dep-cycle-c', + dependents: [ + { + type: 'peer', + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-b', + version: '1.0.0', + whileInstalling: { name: '@isaacs/peer-dep-cycle-a', version: '1.0.0' }, + location: 'node_modules/@isaacs/peer-dep-cycle-b', + dependents: [ + { + type: 'peer', + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-a', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-a', + dependents: [ + { + type: 'prod', + spec: '1.x', + from: { location: '/some/project' } + } + ] + } + } + ] + } + } + ] + }, + fixWithForce: false, + type: 'peer', + isPeer: true + }, + + withShrinkwrap: { + code: 'ERESOLVE', + dep: { + name: '@isaacs/peer-dep-cycle-c', + version: '1.0.0', + whileInstalling: { name: '@isaacs/peer-dep-cycle-b', version: '1.0.0' }, + location: 'node_modules/@isaacs/peer-dep-cycle-c', + dependents: [ + { + type: 'peer', + spec: '1', + error: 'INVALID', + from: { + name: '@isaacs/peer-dep-cycle-b', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-b', + dependents: [ + { + type: 'peer', + spec: '1', + from: { + name: '@isaacs/peer-dep-cycle-a', + version: '1.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-a', + dependents: [ + { + type: 'prod', + spec: '1.x', + from: { location: '/some/project' } + } + ] + } + } + ] + } + } + ] + }, + current: { + name: '@isaacs/peer-dep-cycle-c', + version: '2.0.0', + location: 'node_modules/@isaacs/peer-dep-cycle-c', + dependents: [ + { + type: 'prod', + spec: '2.x', + from: { location: '/some/project' } + } + ] + }, + fixWithForce: true, + type: 'peer' + }, + + gatsby: { + code: 'ERESOLVE', + dep: { + name: 'react', + version: '16.8.1', + whileInstalling: { + name: 'gatsby-interface', + version: '0.0.166' + }, + location: 'node_modules/react', + dependents: [ + { + type: 'peer', + spec: '16.8.1', + error: 'INVALID', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + current: { + name: 'react', + version: '16.13.1', + location: 'node_modules/react', + dependents: [ + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.13.1', + from: { + name: 'react-dom', + version: '16.13.1', + location: 'node_modules/react-dom', + dependents: [ + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + }, + { + type: 'peer', + spec: '15.x || 16.x || 16.4.0-alpha.0911da3', + from: { + name: '@reach/router', + version: '1.3.4', + location: 'node_modules/@reach/router', + dependents: [ + { + type: 'prod', + spec: '^1.3.4', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.3.3', + from: { + name: 'gatsby-link', + version: '2.4.13', + location: 'node_modules/gatsby-link', + dependents: [ + { + type: 'prod', + spec: '^2.4.13', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.0.0', + from: { + name: 'gatsby-react-router-scroll', + version: '3.0.12', + location: 'node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^3.0.12', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby-link', + version: '2.4.13', + location: 'node_modules/gatsby-link', + dependents: [ + { + type: 'prod', + spec: '^2.4.13', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby-react-router-scroll', + version: '3.0.12', + location: 'node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^3.0.12', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^15.0.0 || ^16.0.0', + from: { + name: 'react-hot-loader', + version: '4.12.21', + location: 'node_modules/react-hot-loader', + dependents: [ + { + type: 'prod', + spec: '^4.12.21', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '15.x || 16.x || 16.4.0-alpha.0911da3', + from: { + name: '@reach/router', + version: '1.3.4', + location: 'node_modules/@reach/router', + dependents: [ + { + type: 'prod', + spec: '^1.3.4', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.3.3', + from: { + name: 'gatsby-link', + version: '2.4.13', + location: 'node_modules/gatsby-link', + dependents: [ + { + type: 'prod', + spec: '^2.4.13', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.0.0', + from: { + name: 'gatsby-react-router-scroll', + version: '3.0.12', + location: 'node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^3.0.12', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'prod', + spec: '^16.8.0', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby-link', + version: '2.4.13', + location: 'node_modules/gatsby-link', + dependents: [ + { + type: 'prod', + spec: '^2.4.13', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby-react-router-scroll', + version: '3.0.12', + location: 'node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^3.0.12', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^15.0.0 || ^16.0.0', + from: { + name: 'react-hot-loader', + version: '4.12.21', + location: 'node_modules/react-hot-loader', + dependents: [ + { + type: 'prod', + spec: '^4.12.21', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^0.14.0 || ^15.0.0 || ^16.0.0', + from: { + name: 'create-react-context', + version: '0.3.0', + location: 'node_modules/create-react-context', + dependents: [ + { + type: 'prod', + spec: '0.3.0', + from: { + name: '@reach/router', + version: '1.3.4', + location: 'node_modules/@reach/router', + dependents: [ + { + type: 'prod', + spec: '^1.3.4', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.3.3', + from: { + name: 'gatsby-link', + version: '2.4.13', + location: 'node_modules/gatsby-link', + dependents: [ + { + type: 'prod', + spec: '^2.4.13', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^1.0.0', + from: { + name: 'gatsby-react-router-scroll', + version: '3.0.12', + location: 'node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^3.0.12', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.12.0', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.8.0', + from: { + name: 'ink', + version: '2.7.1', + location: 'node_modules/ink', + dependents: [ + { + type: 'prod', + spec: '^2.7.1', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^2.0.0', + from: { + name: 'ink-spinner', + version: '3.1.0', + location: 'node_modules/ink-spinner', + dependents: [ + { + type: 'prod', + spec: '^3.1.0', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=2.0.0', + from: { + name: 'ink-box', + version: '1.0.0', + location: 'node_modules/ink-box', + dependents: [ + { + type: 'prod', + spec: '^1.0.0', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.8.2', + from: { + name: 'ink-spinner', + version: '3.1.0', + location: 'node_modules/ink-spinner', + dependents: [ + { + type: 'prod', + spec: '^3.1.0', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.3.0', + from: { + name: '@emotion/core', + version: '10.0.35', + location: 'node_modules/@emotion/core', + dependents: [ + { + type: 'prod', + spec: '^10.0.14', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.27', + from: { + name: '@emotion/styled', + version: '10.0.27', + location: 'node_modules/@emotion/styled', + dependents: [ + { + type: 'prod', + spec: '^10.0.14', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.14', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.14', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.28', + from: { + name: '@emotion/styled-base', + version: '10.0.31', + location: 'node_modules/@emotion/styled-base', + dependents: [ + { + type: 'prod', + spec: '^10.0.27', + from: { + name: '@emotion/styled', + version: '10.0.27', + location: 'node_modules/@emotion/styled', + dependents: [ + { + type: 'prod', + spec: '^10.0.14', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.14', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.3.0', + from: { + name: '@emotion/styled', + version: '10.0.27', + location: 'node_modules/@emotion/styled', + dependents: [ + { + type: 'prod', + spec: '^10.0.14', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.14', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.13.1', + from: { + name: '@mdx-js/react', + version: '2.0.0-next.7', + location: 'node_modules/@mdx-js/react', + dependents: [ + { + type: 'prod', + spec: '^2.0.0-next.4', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'prod', + spec: '^2.0.0-next.7', + from: { + name: '@mdx-js/runtime', + version: '2.0.0-next.7', + location: 'node_modules/@mdx-js/runtime', + dependents: [ + { + type: 'prod', + spec: '^2.0.0-next.4', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.13.1', + from: { + name: '@mdx-js/runtime', + version: '2.0.0-next.7', + location: 'node_modules/@mdx-js/runtime', + dependents: [ + { + type: 'prod', + spec: '^2.0.0-next.4', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.8.0', + from: { + name: 'formik', + version: '2.1.5', + location: 'node_modules/formik', + dependents: [ + { + type: 'prod', + spec: '^2.0.8', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^2.0.8', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby', + version: '2.6.0', + location: 'node_modules/gatsby-recipes/node_modules/gatsby', + dependents: [ + { + type: 'peer', + spec: '2.6.0', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.0.0', + from: { + name: 'react-dom', + version: '16.8.1', + location: 'node_modules/gatsby-recipes/node_modules/react-dom', + dependents: [ + { + type: 'peer', + spec: '16.8.1', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.4.2', + from: { + name: 'gatsby', + version: '2.6.0', + location: 'node_modules/gatsby-recipes/node_modules/gatsby', + dependents: [ + { + type: 'peer', + spec: '2.6.0', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^0.14.0 || ^15.0.0 || ^16.0.0', + from: { + name: 'gatsby-react-router-scroll', + version: '2.3.1', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^2.0.7', + from: { + name: 'gatsby', + version: '2.6.0', + location: 'node_modules/gatsby-recipes/node_modules/gatsby', + dependents: [ + { + type: 'peer', + spec: '2.6.0', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '*', + from: { + name: 'react-icons', + version: '3.11.0', + location: 'node_modules/react-icons', + dependents: [ + { + type: 'prod', + spec: '^3.0.1', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^3.2.1', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.8.0', + from: { + name: 'ink-box', + version: '1.0.0', + location: 'node_modules/ink-box', + dependents: [ + { + type: 'prod', + spec: '^1.0.0', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^0.14.0 || ^15.0.0 || ^16.0.0', + from: { + name: 'react-circular-progressbar', + version: '2.0.3', + location: 'node_modules/react-circular-progressbar', + dependents: [ + { + type: 'prod', + spec: '^2.0.0', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.13.1', + from: { + name: 'react-reconciler', + version: '0.25.1', + location: 'node_modules/react-reconciler', + dependents: [ + { + type: 'prod', + spec: '^0.25.1', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>= 16.8.0', + from: { + name: 'urql', + version: '1.10.0', + location: 'node_modules/urql', + dependents: [ + { + type: 'prod', + spec: '^1.9.7', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=16.3.0', + from: { + name: '@emotion/styled-base', + version: '10.0.31', + location: 'node_modules/@emotion/styled-base', + dependents: [ + { + type: 'prod', + spec: '^10.0.27', + from: { + name: '@emotion/styled', + version: '10.0.27', + location: 'node_modules/@emotion/styled', + dependents: [ + { + type: 'prod', + spec: '^10.0.14', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^10.0.14', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.0.0', + from: { + name: 'react-reconciler', + version: '0.24.0', + location: 'node_modules/ink/node_modules/react-reconciler', + dependents: [ + { + type: 'prod', + spec: '^0.24.0', + from: { + name: 'ink', + version: '2.7.1', + location: 'node_modules/ink', + dependents: [ + { + type: 'prod', + spec: '^2.7.1', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^2.0.0', + from: { + name: 'ink-spinner', + version: '3.1.0', + location: 'node_modules/ink-spinner', + dependents: [ + { + type: 'prod', + spec: '^3.1.0', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '>=2.0.0', + from: { + name: 'ink-box', + version: '1.0.0', + location: 'node_modules/ink-box', + dependents: [ + { + type: 'prod', + spec: '^1.0.0', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^0.14.0 || ^15.0.0 || ^16.0.0', + from: { + name: 'gatsby-react-router-scroll', + version: '2.3.1', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-react-router-scroll', + dependents: [ + { + type: 'prod', + spec: '^2.0.7', + from: { + name: 'gatsby', + version: '2.6.0', + location: 'node_modules/gatsby-recipes/node_modules/gatsby', + dependents: [ + { + type: 'peer', + spec: '2.6.0', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + type: 'peer', + spec: '^16.13.1', + from: { + name: '@mdx-js/react', + version: '1.6.16', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface/node_modules/@mdx-js/react', + dependents: [ + { + type: 'prod', + spec: '^1.5.2', + from: { + name: 'gatsby-interface', + version: '0.0.166', + location: 'node_modules/gatsby-recipes/node_modules/gatsby-interface', + dependents: [ + { + type: 'prod', + spec: '^0.0.166', + from: { + name: 'gatsby-recipes', + version: '0.2.20', + location: 'node_modules/gatsby-recipes', + dependents: [ + { + type: 'prod', + spec: '^0.2.20', + from: { + name: 'gatsby-cli', + version: '2.12.91', + location: 'node_modules/gatsby-cli', + dependents: [ + { + type: 'prod', + spec: '^2.12.91', + from: { + name: 'gatsby', + version: '2.24.53', + location: 'node_modules/gatsby', + dependents: [ + { + type: 'prod', + spec: '', + from: { + location: '/path/to/gatsby-user' + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + peerConflict: null, + fixWithForce: true, + type: 'peer', + isPeer: true + } +} diff --git a/test/lib/utils/error-message.js b/test/lib/utils/error-message.js index b69b5302f1d5e..14d75e31ec6f5 100644 --- a/test/lib/utils/error-message.js +++ b/test/lib/utils/error-message.js @@ -57,7 +57,16 @@ npmlog.verbose = (...message) => { verboseLogs.push(message) } -const errorMessage = require('../../../lib/utils/error-message.js') +const requireInject = require('require-inject') +const EXPLAIN_CALLED = [] +const errorMessage = requireInject('../../../lib/utils/error-message.js', { + '../../../lib/utils/explain-eresolve.js': { + report: (...args) => { + EXPLAIN_CALLED.push(args) + return 'explanation' + } + } +}) t.test('just simple messages', t => { npm.command = 'audit' @@ -416,3 +425,12 @@ t.test('bad platform', t => { t.end() }) + +t.test('explain ERESOLVE errors', t => { + const er = Object.assign(new Error('could not resolve'), { + code: 'ERESOLVE' + }) + t.matchSnapshot(errorMessage(er)) + t.strictSame(EXPLAIN_CALLED, [[er]]) + t.end() +}) diff --git a/test/lib/utils/explain-eresolve.js b/test/lib/utils/explain-eresolve.js new file mode 100644 index 0000000000000..def13153d242d --- /dev/null +++ b/test/lib/utils/explain-eresolve.js @@ -0,0 +1,50 @@ +const t = require('tap') +const requireInject = require('require-inject') +const npm = {} +const { explain, report } = requireInject('../../../lib/utils/explain-eresolve.js', { + '../../../lib/npm.js': npm +}) +const { statSync, readFileSync, unlinkSync } = require('fs') +// strip out timestamps from reports +const read = f => readFileSync(f, 'utf8') + .replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/g, '${TIME}') + +const { resolve } = require('path') + +const cases = require('../../fixtures/eresolve-explanations.js') + +for (const [name, expl] of Object.entries(cases)) { + // no sense storing the whole contents of each object in the snapshot + // we can trust that JSON.stringify still works just fine. + expl.toJSON = () => { + return { name, json: true } + } + + t.test(name, t => { + npm.cache = t.testdir() + const reportFile = resolve(npm.cache, 'eresolve-report.txt') + t.cleanSnapshot = str => str.split(reportFile).join('${REPORT}') + + npm.color = true + t.matchSnapshot(report(expl), 'report with color') + const reportData = read(reportFile) + t.matchSnapshot(reportData, 'report') + unlinkSync(reportFile) + t.matchSnapshot(report(expl, 2), 'report with color, depth only 2') + t.equal(read(reportFile), reportData, 'same report written for object') + unlinkSync(reportFile) + npm.color = false + t.matchSnapshot(report(expl, 6), 'report with no color, depth of 6') + t.equal(read(reportFile), reportData, 'same report written for object') + + unlinkSync(reportFile) + npm.color = true + t.matchSnapshot(explain(expl), 'explain with color') + t.throws(() => statSync(reportFile), { code: 'ENOENT' }, 'no report') + npm.color = false + t.matchSnapshot(explain(expl, 6), 'explain with no color, depth of 6') + t.throws(() => statSync(reportFile), { code: 'ENOENT' }, 'no report') + + t.end() + }) +} diff --git a/test/lib/utils/setup-log.js b/test/lib/utils/setup-log.js index 107edfb0f7b3a..2d5d794f1377a 100644 --- a/test/lib/utils/setup-log.js +++ b/test/lib/utils/setup-log.js @@ -7,30 +7,43 @@ t.afterEach(cb => { cb() }) +const WARN_CALLED = [] +const npmlog = { + level: 'warn', + warn: (...args) => { + WARN_CALLED.push(args) + }, + levels: { + silly: -Infinity, + verbose: 1000, + info: 2000, + timing: 2500, + http: 3000, + notice: 3500, + warn: 4000, + error: 5000, + silent: Infinity + }, + settings, + enableColor: () => { settings.color = true }, + disableColor: () => { settings.color = false }, + enableUnicode: () => { settings.unicode = true }, + disableUnicode: () => { settings.unicode = false }, + enableProgress: () => { settings.progress = true }, + disableProgress: () => { settings.progress = false }, + set heading (h) { settings.heading = h }, + set level (l) { settings.level = l } +} + +const EXPLAIN_CALLED = [] const setupLog = requireInject('../../../lib/utils/setup-log.js', { - npmlog: { - level: 'warn', - levels: { - silly: -Infinity, - verbose: 1000, - info: 2000, - timing: 2500, - http: 3000, - notice: 3500, - warn: 4000, - error: 5000, - silent: Infinity - }, - settings, - enableColor: () => { settings.color = true }, - disableColor: () => { settings.color = false }, - enableUnicode: () => { settings.unicode = true }, - disableUnicode: () => { settings.unicode = false }, - enableProgress: () => { settings.progress = true }, - disableProgress: () => { settings.progress = false }, - set heading (h) { settings.heading = h }, - set level (l) { settings.level = l } - } + '../../../lib/utils/explain-eresolve.js': { + explain: (...args) => { + EXPLAIN_CALLED.push(args) + return 'explanation' + } + }, + npmlog }) const config = obj => ({ @@ -43,6 +56,11 @@ const config = obj => ({ }) t.test('setup with color=always and unicode', t => { + npmlog.warn('ERESOLVE', 'hello', { some: 'object' }) + t.strictSame(EXPLAIN_CALLED, [], 'log.warn() not patched yet') + t.strictSame(WARN_CALLED, [['ERESOLVE', 'hello', { some: 'object' }]]) + WARN_CALLED.length = 0 + t.equal(setupLog(config({ loglevel: 'warn', color: 'always', @@ -50,6 +68,19 @@ t.test('setup with color=always and unicode', t => { progress: false })), true) + npmlog.warn('ERESOLVE', 'hello', { some: { other: 'object' } }) + t.strictSame(EXPLAIN_CALLED, [[{ some: { other: 'object' } }]], + 'log.warn(ERESOLVE) patched to call explainEresolve()') + t.strictSame(WARN_CALLED, [ + ['ERESOLVE', 'hello'], + ['', 'explanation'] + ], 'warn the explanation') + EXPLAIN_CALLED.length = 0 + WARN_CALLED.length = 0 + npmlog.warn('some', 'other', 'thing') + t.strictSame(EXPLAIN_CALLED, [], 'do not try to explain other things') + t.strictSame(WARN_CALLED, [['some', 'other', 'thing']], 'warnings passed through') + t.strictSame(settings, { level: 'warn', color: true,