Yet another error upon upgrade.

Solved Technical Support
  • Something happens every single time 😲 How can what I am guessing to be a small upgrade manage to produce this?

    git reset --hard origin/v1.18.x

    then ./nodebb upgrade

    As per the instructions on the upgrade page and from the advice last time this happened. And: BOOM

    Updating NodeBB...

    1. Updating package.json file with defaults... OK

    2. Bringing base dependencies up to date... started
      npm ERR! code ERESOLVE
      npm ERR! ERESOLVE unable to resolve dependency tree
      npm ERR!
      npm ERR! While resolving: [email protected]
      npm ERR! Found: [email protected]
      npm ERR! node_modules/mongodb
      npm ERR! mongodb@"3.7.1" from the root project
      npm ERR!
      npm ERR! Could not resolve dependency:
      npm ERR! peer mongodb@"^4.1.0" from [email protected]
      npm ERR! node_modules/connect-mongo
      npm ERR! connect-mongo@"4.6.0" 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 /root/.npm/eresolve-report.txt for a full report.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /root/.npm/_logs/2021-09-22T21_46_50_060Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    Error occurred during upgrade: Error: Command failed: npm install --production
    at checkExecSyncError (child_process.js:643:11)
    at Object.execSync (child_process.js:679:15)
    at Object.installAll (/home/smiley/nodebb/src/cli/package-install.js:73:9)
    at Object.handler (/home/smiley/nodebb/src/cli/upgrade.js:21:19)
    at runSteps (/home/smiley/nodebb/src/cli/upgrade.js:54:16)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Object.runUpgrade [as upgrade] (/home/smiley/nodebb/src/cli/upgrade.js:84:3)
    (node:10568) UnhandledPromiseRejectionWarning: Error: Command failed: npm install --production
    at checkExecSyncError (child_process.js:643:11)
    at Object.execSync (child_process.js:679:15)
    at Object.installAll (/home/smiley/nodebb/src/cli/package-install.js:73:9)
    at Object.handler (/home/smiley/nodebb/src/cli/upgrade.js:21:19)
    at runSteps (/home/smiley/nodebb/src/cli/upgrade.js:54:16)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Object.runUpgrade [as upgrade] (/home/smiley/nodebb/src/cli/upgrade.js:84:3)
    (Use node --trace-warnings ... to show where the warning was created)
    (node:10568) 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:10568) [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.

  • Your version of npm does strict peer dependency checks because you're on a version of Node near than version 14, which is the latest that we currently support. You can downgrade npm with npm install --global npm@6 to fix this until we support it directly.

  • @pitaj said in Yet another error upon upgrade.:

    npm install --global npm@6

    That worked. Thanks as always

  • Sampo2910S Sampo2910 has marked this topic as solved on

Suggested Topics