unable to resolve dependency tree
adnjoo opened this issue · comments
Hi I tried to run npx create-sourcebit with the options: contentful, transform-assets, and next and get the following error:
Error: Command failed: npm install sourcebit sourcebit-source-contentful sourcebit-transform-assets sourcebit-target-next --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: blog3@0.1.0
npm ERR! Found: next@10.1.3
npm ERR! node_modules/next
npm ERR! next@"10.1.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^9.3.0" from sourcebit-target-next@0.5.2
npm ERR! node_modules/sourcebit-target-next
npm ERR! sourcebit-target-next@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/andrewnjoo/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/andrewnjoo/.npm/_logs/2021-04-15T16_01_31_041Z-debug.log
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
killed: false,
code: 1,
signal: null,
cmd: 'npm install sourcebit sourcebit-source-contentful sourcebit-transform-assets sourcebit-target-next --save'
}
(node:21239) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'errors' of '(intermediate value)' as it is undefined.
at /Users/andrewnjoo/.npm/_npx/dd234b8c5ef95e98/node_modules/create-sourcebit/index.js:23:13
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use node --trace-warnings ...
to show where the warning was created)
(node:21239) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21239) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@adnjoo Did you manage to resolve this error? I'm getting the same thing and there's nothing online on how to fix it.
Looks like the old version of sourcebit-target-next
(v0.5.2) had Next.js v9 peer dependency on Next.js.
Updated sourcebit-target-next
to v0.6.2, it is now using Nextjs v10 as peer dependency.