nodebb upgrade help



  • I already asked in the appropriate github repo, but haven't really heard back, and it looks like the problem may be with my set up somehow.

    I upgraded to the latest nodebb on my development laptop and while running nodebb upgrade, I get the following error:

    OK | 1 script(s) found, 67 skipped
      → [2018/12/26] Changing dbsearch mongodb search schema to use _id...
    2018-12-09T19:44:55.095Z [25692] - error: uncaughtException: Cannot find module './src/database'
    Error: Cannot find module './src/database'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
        at Function.Module._load (internal/modules/cjs/loader.js:506:25)
        at Module.require (internal/modules/cjs/loader.js:636:17)
        at Object.<anonymous> (C:\web\nodebb\NodeBB\node_modules\nodebb-plugin-dbsearch\lib\dbsearch.js:9:23)
        at Module._compile (internal/modules/cjs/loader.js:688:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
        at Module.load (internal/modules/cjs/loader.js:598:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
        at Function.Module._load (internal/modules/cjs/loader.js:529:3)
        at Module.require (internal/modules/cjs/loader.js:636:17) {"error":{"code":"MODULE_NOT_FOUND"},"stack":"Error: Cannot find module './src/database'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:506:25)\n    at Module.require (internal/modules/cjs/loader.js:636:17)\n    at Object.<anonymous> (C:\\web\\nodebb\\NodeBB\\node_modules\\nodebb-plugin-dbsearch\\lib\\dbsearch.js:9:23)\n    at Module._compile (internal/modules/cjs/loader.js:688:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)\n    at Module.load (internal/modules/cjs/loader.js:598:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:529:3)\n    at Module.require (internal/modules/cjs/loader.js:636:17)","exception":true,"date":"Sun Dec 09 2018 14:44:55 GMT-0500 (Eastern Standard Time)","process":{"pid":25692,"uid":null,"gid":null,"cwd":"C:\\web\\nodebb\\NodeBB","execPath":"C:\\Program Files\\nodejs\\node.exe","version":"v10.14.1","argv":["C:\\Program Files\\nodejs\\node.exe","C:\\web\\nodebb\\NodeBB\\src\\cli","upgrade"],"memoryUsage":{"rss":132288512,"heapTotal":108859392,"heapUsed":83284472,"external":19594438}},"os":{"loadavg":[0,0,0],"uptime":587140},"trace":[{"column":15,"file":"internal/modules/cjs/loader.js","function":"Module._resolveFilename","line":580,"method":"_resolveFilename","native":false},{"column":25,"file":"internal/modules/cjs/loader.js","function":"Module._load","line":506,"method":"_load","native":false},{"column":17,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":636,"method":"require","native":false},{"column":23,"file":"C:\\web\\nodebb\\NodeBB\\node_modules\\nodebb-plugin-dbsearch\\lib\\dbsearch.js","function":null,"line":9,"method":null,"native":false},{"column":30,"file":"internal/modules/cjs/loader.js","function":"Module._compile","line":688,"method":"_compile","native":false},{"column":10,"file":"internal/modules/cjs/loader.js","function":"Module._extensions..js","line":699,"method":".js","native":false},{"column":32,"file":"internal/modules/cjs/loader.js","function":"Module.load","line":598,"method":"load","native":false},{"column":12,"file":"internal/modules/cjs/loader.js","function":"tryModuleLoad","line":537,"method":null,"native":false},{"column":3,"file":"internal/modules/cjs/loader.js","function":"Module._load","line":529,"method":"_load","native":false},{"column":17,"file":"internal/modules/cjs/loader.js","function":"Module.require","line":636,"method":"require","native":false}]}
    

    Seems like an import is not working. Not sure if something is screwed up in my set up, or if the module itself is not properly importing things (because perhaps things moved around in the latest release.



  • Does anyone have any ideas? I'm still pretty n00by at nodejs, so I could be missing something simple.


  • 🚽 Regular

    @dangeRuss said in nodebb upgrade help:

    Does anyone have any ideas? I'm still pretty n00by at nodejs, so I could be missing something simple.

    No idea about nodebb, but from just looking at the stack trace it can't find a path it requires:

    ./src/database

    Does that actually exist relative to the script? If it does then I'd suspect a permissions issue. If not then I'd either try to populate that directory or open that script to find out how it gets that path and how to redirect it.

    Sorry it's not concrete help but maybe something here is useful.


  • ♿ (Parody)

    @Cursorkeys said in nodebb upgrade help:

    Does that actually exist relative to the script?

    Yeah, I'd wonder about Stupid Git Errors at that point. But I haven't messed with nodebb on that level for a while. It's been all @ben_lubar around here for a while.


  • Notification Spam Recipient

    @dangeRuss said in nodebb upgrade help:

    Not sure if something is screwed up in my set up,

    Might be one of those hard-reset situations I think.



  • @dangeRuss if you have any instances of module.parent.require() for NodeBB modules, change them to require.main.require() (I think one is in a different directory than the other but I can't remember which one is which off the top of my head)



  • @boomzilla this is the main reason we aren't on the latest version of NodeBB right now. The update breaks compatibility with a huge number of plugins we use.


  • ♿ (Parody)

    @ben_lubar do you have a list of plugins?

    Maybe it's time to create a new nodebb dev machine.


  • Discourse touched me in a no-no place

    @boomzilla said in nodebb upgrade help:

    Maybe it's time to create a new nodebb dev machine.

    I thought this was the dev machine? 🐠


  • ♿ (Parody)

    @loopback0 well, it's @ben_lubar's, not mine.



  • @boomzilla said in nodebb upgrade help:

    @loopback0 well, it's @ben_lubar's, not mine.

    The dev machine is more powerful than the production machine but it also only has 1.5Mbps up.

    On a related note, here's dwangoAC building a machine that cost three times as much as the dev machine: https://www.twitch.tv/videos/348416996 (the video will probably have been deleted by Twitch if you visit this too late, but if you get there in time, there are some pictures of my sister's dog)


  • Notification Spam Recipient

    @ben_lubar said in nodebb upgrade help:

    there are some pictures of my sister's dog)

    Your sister's dog is a fan of the TASBot facilitator?

    I'm not watching a six hour stream for that though.



  • @Tsaukpaetra said in nodebb upgrade help:

    @ben_lubar said in nodebb upgrade help:

    there are some pictures of my sister's dog)

    Your sister's dog is a fan of the TASBot facilitator?

    I'm not watching a six hour stream for that though.

    Just skip to some random timestamp and look in the bottom left.


  • Notification Spam Recipient

    @ben_lubar said in nodebb upgrade help:

    @Tsaukpaetra said in nodebb upgrade help:

    @ben_lubar said in nodebb upgrade help:

    there are some pictures of my sister's dog)

    Your sister's dog is a fan of the TASBot facilitator?

    I'm not watching a six hour stream for that though.

    Just skip to some random timestamp and look in the bottom left.

    Your sister's dog is sentient?

    Screenshot_Chrome_Beta_20181216-114106.png



  • @Tsaukpaetra said in nodebb upgrade help:

    @ben_lubar said in nodebb upgrade help:

    @Tsaukpaetra said in nodebb upgrade help:

    @ben_lubar said in nodebb upgrade help:

    there are some pictures of my sister's dog)

    Your sister's dog is a fan of the TASBot facilitator?

    I'm not watching a six hour stream for that though.

    Just skip to some random timestamp and look in the bottom left.

    Your sister's dog is sentient?

    Screenshot_Chrome_Beta_20181216-114106.png

    yes



  • @ben_lubar Seems like you guys have upgraded past this version now. Did you run into the same trouble as me with the search module upgrade?


Log in to reply