Upgrade from 1.8.1 to 1.8.2 failed

Technical Support
  • Oh boy... what a error 😬

    If you are seeing weird npm errors, remember to delete npm-shrinkwrap.json, package-lock.json, as well as clearing cache and such.

    Double-check your package.json to make sure it doesn't require node-gyp or heapdump, we shouldn't require those.

    Honestly if all else fails... install yarn, set package_manager in config.json to yarn, and then yarn...

  • If you are seeing weird npm errors, remember to delete npm-shrinkwrap.json, package-lock.json, as well as clearing cache and such.

    I did.

    Double-check your package.json to make sure it doesn't require node-gyp or heapdump, we shouldn't require those.

    Doesn't.

    Honestly if all else fails... install yarn, set package_manager in config.json to yarn, and then yarn...

    I don't understand. Especially, since before 1.8.2 I had no problem upgrading, I started at 1.7.5 and did it twice successfully.

    It's a desaster 😞

  • Yarn is a different package manager. npm is... a disaster, as you say, sometimes. Configs and caches littered all over the file system that you have no idea what to do to get it working again.

    That's why I say use yarn.

  • Yes, but how?

  • Install documentation: yarnpkg.com/en/docs/install

  • Nope.

    What's interesting though is that it tries to upgrade /package/host/localhost/nodejs-6.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js which is a global package.

  • Eh... paste your package.json please. Pretty sure you can remove lwip from there. That's not been required for quite awhile.

  • Eh... paste your package.json please

    Ah, how is it "my" package.json? It came with NodeBB 🙂

    Well, here it is:

    {
      "name": "nodebb",
      "license": "GPL-3.0",
      "description": "NodeBB Forum",
      "version": "0.8.2",
      "homepage": "http://www.nodebb.org",
      "repository": {
        "type": "git",
        "url": "https://github.com/NodeBB/NodeBB/"
      },
      "main": "app.js",
      "scripts": {
        "start": "node loader.js",
        "test": "mocha ./tests -t 10000"
      },
      "dependencies": {
        "async": "~1.4.2",
        "bcryptjs": "~2.2.1",
        "body-parser": "^1.9.0",
        "colors": "^1.1.0",
        "compression": "^1.1.0",
        "connect-ensure-login": "^0.1.1",
        "connect-flash": "^0.1.1",
        "connect-multiparty": "^2.0.0",
        "cookie-parser": "^1.3.3",
        "cron": "^1.0.5",
        "csurf": "^1.6.1",
        "daemon": "~1.1.0",
        "express": "^4.9.5",
        "express-session": "^1.8.2",
        "gravatar": "^1.1.0",
        "less": "^2.0.0",
        "logrotate-stream": "^0.2.3",
        "lru-cache": "^2.6.1",
        "lwip": "0.0.7",
        "mime": "^1.3.4",
        "minimist": "^1.1.1",
        "mkdirp": "~0.5.0",
        "mmmagic": "^0.4.0",
        "morgan": "^1.3.2",
        "nconf": "~0.7.1",
        "nodebb-plugin-composer-default": "1.0.14",
        "nodebb-plugin-dbsearch": "0.2.16",
        "nodebb-plugin-emoji-extended": "0.4.13",
        "nodebb-plugin-markdown": "4.0.5",
        "nodebb-plugin-mentions": "1.0.2",
        "nodebb-plugin-soundpack-default": "0.1.4",
        "nodebb-plugin-spam-be-gone": "0.4.2",
        "nodebb-rewards-essentials": "0.0.5",
        "nodebb-theme-lavender": "2.0.1",
        "nodebb-theme-persona": "3.0.13",
        "nodebb-theme-vanilla": "4.0.8",
        "nodebb-widget-essentials": "2.0.1",
        "npm": "^2.1.4",
        "passport": "^0.3.0",
        "passport-local": "1.0.0",
        "prompt": "^0.2.14",
        "request": "^2.44.0",
        "rimraf": "~2.4.2",
        "rss": "^1.0.0",
        "semver": "^5.0.1",
        "serve-favicon": "^2.1.5",
        "sitemap": "^1.0.0",
        "socket.io": "^1.2.1",
        "socket.io-client": "^1.2.1",
        "socket.io-redis": "^0.1.3",
        "socketio-wildcard": "~0.1.1",
        "string": "^3.0.0",
        "templates.js": "0.2.10",
        "touch": "1.0.0",
        "uglify-js": "^2.4.24",
        "underscore": "~1.8.3",
        "underscore.deep": "^0.5.1",
        "validator": "^4.0.5",
        "winston": "^1.0.1",
        "xregexp": "~2.0.0"
      },
      "devDependencies": {
        "mocha": "~1.13.0",
        "grunt": "~0.4.5",
        "grunt-contrib-watch": "^0.6.1"
      },
      "bugs": {
        "url": "https://github.com/NodeBB/NodeBB/issues"
      },
      "engines": {
        "node": ">=0.10"
      },
      "maintainers": [
        {
          "name": "Andrew Rodrigues",
          "email": "[email protected]",
          "url": "https://github.com/psychobunny"
        },
        {
          "name": "Julian Lam",
          "email": "[email protected]",
          "url": "https://github.com/julianlam"
        },
        {
          "name": "Barı�<9F> Soner U�<9F>aklı",
          "email": "[email protected]",
          "url": "https://github.com/barisusakli"
        }
      ]
    }
    

    Pretty sure you can remove lwip from there.

    Ok, I did ... and ran into the same compilation error with some module named mmagic.

  • That one too.

    Ah, how is it "my" package.json? It came with NodeBB 🙂

    Nice try. It used to come with NodeBB. Now it's yours and you can muck it up all you want 😉

    Let's hope removing lwip and mmmagic fixes this for you.

    Remember: it's mmmagic with three m's

  • Thanks goodness, now it went through with success.

    What next? Do I still need to execute ./nodebb upgrade?

  • Yes... that's correct. If you want, you can set package_manager to yarn, so the nodebb upgrade process uses yarn as well.

    Then you should be good to go.

  • Just some context... lwip and mmmagic have led to many headaches similar to what you just experienced this past week. It's part of the reason why we push for js-only dependencies and minimize built dependencies as much as possible.

    As for package.json... like I mentioned before we no longer commit it to the repository. What you have now is a copy of the one that used to come with NodeBB. During the upgrade process, we merge that copy with the one in install/ to create a more up-to-date one while preserving any plugins and such you've already got installed.

    In your case, the lwip and mmmagic dependencies just got carried over when you upgraded to latest.

  • You did say you started on 1.7.5 though, which is super weird as that should not have those dependencies in the first place.

  • Well, at least I didn't add them as I don't have any clue about this stuff 🙂 This is how I started: git clone -b v1.7.5 https://github.com/NodeBB/NodeBB.git nodebb.

  • @julian said in Upgrade from 1.8.1 to 1.8.2 failed:

    Yes... that's correct. If you want, you can set package_manager to yarn, so the nodebb upgrade process uses yarn as well.

    Then you should be good to go.

    ok, I'll try this on production tomorrow.

    Thanks for you help so far!


Suggested Topics


  • 0 Votes
    11 Posts
    2315 Views
  • 0 Votes
    9 Posts
    2800 Views
  • 0 Votes
    2 Posts
    1346 Views
  • 0 Votes
    3 Posts
    1261 Views
  • 0 Votes
    6 Posts
    2167 Views