Update from 1.13.2 to 1.14.2 error in npm module "sitemap"

Technical Support
  • Hi folks,

    I upgraded my nodebb forum from 1.13.2 to 1.14.2 after the update instructions from nodebb :

    I followed the instructions closely.
    When I do ./nodebb start and then ./nodebb log I am getting the following error:

    ./nodebb start
    ./nodebb log
    
    [cluster] Child Process (27282) has exited (code: 0, signal: null)
    
    NodeBB v1.14.2 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 1 process(es).
    
    2020-07-30T19:09:15.630Z [4567/27471] - info: Initializing NodeBB v1.14.2 
    2020-07-30T19:09:19.657Z [4567/27471] - error: TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
        at Object.promisify (internal/util.js:214:11)
        at Object.<anonymous> (/opt/nodebb/node_modules/sitemap/dist/lib/sitemap-simple.js:11:25)
        at Module._compile (module.js:653:30)
        at Object.Module._extensions..js (module.js:664:10)
        at Module.load (module.js:566:32)
        at tryModuleLoad (module.js:506:12)
        at Function.Module._load (module.js:498:3)
        at Module.require (module.js:597:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (/opt/nodebb/node_modules/sitemap/dist/index.js:42:24)
    [cluster] Child Process (27471) has exited (code: 0, signal: null)
    

    Could somebody please enlighten me. šŸ¤” ā“
    I have no idea why this error appears now. It did not in 1.13.2.

    I tried to rename the npm module "sitemap" to "__sitemap"
    but then nodebb is missing the folder ... šŸ˜ž
    Stupid idea - I know - but I thought I could give it a try, before writing here šŸ™‚

    Kind regards
    tecy

  • What do you get when you run npm ls sitemap

  • Hi @baris
    this is my result:

    /opt/nodebb# npm ls sitemap
    [email protected] /opt/nodebb
    ā””ā”€ā”€ [email protected] 
    

    Folder rights of all modules in node_modules are good:

    • nodebb:nodebb

    That seems to be all right, as this user, ist the user nodebb has been installed with.

  • Works fine for me on 6.2.0, what about your nodejs version?

  • node -v
    v8.17.0
    
  • Try with 10.x or higher.

  • You made my day! šŸ™‚ šŸ‘
    I think I need to take more care of the versions ... šŸ˜‰

    Is there any chance I can buy you a coffee or a beer,
    to value your work?

  • @tecy No need šŸ™‚


Suggested Topics


  • 0 Votes
    2 Posts
    149 Views

    @Fanecticut hi there! Can you contact us at [email protected]?

  • 0 Votes
    24 Posts
    2k Views

    @baris Using the below site, reminding me of just how powerful Chrome Developers tools are, I was able to Copy As Curl the specific PUT command.

    Curl Convert

    Then using the same command and just changing the CID, I confirmed the same command works for all of them.

    This is what ended up working, it includes all the recorded headers, of which some will be removed as not necessary:

    curl 'http://pubdump.unfufadoo.net:4567/api/v3/categories/80' \ -X 'PUT' \ -H 'Connection: keep-alive' \ -H 'Accept: */*' \ -H 'DNT: 1' \ -H 'x-csrf-token: H5FMJEaY-CthHWM_2Unzf7DtoPeryGq_JejE' \ -H 'X-Requested-With: XMLHttpRequest' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36' \ -H 'Content-Type: application/json; charset=UTF-8' \ -H 'Origin: http://pubdump.unfufadoo.net:4567' \ -H 'Referer: http://pubdump.unfufadoo.net:4567/admin/manage/categories/80' \ -H 'Accept-Language: en-US,en;q=0.9,zh;q=0.8,zh-CN;q=0.7,zh-TW;q=0.6,ja;q=0.5,ko;q=0.4,th;q=0.3' \ -H 'Cookie: _csrf=27ygKMdG0c0EyiVsJKAkKpId; express.sid=s%3AdODaXfUpLz7NTFsijWLq0d2rPUhH1Ki4.qkyxWOaxlBy%2BLDRpTYbhWS9QkD9IJE%2FRTN1vIhp7yV4' \ -H 'sec-gpc: 1' \ --data '{"backgroundImage":"/assets/uploads/category/category-84.jpg"}' \ --compressed \ --insecure

    Then using the cURL convert site, was able to save as javascript and modify to our needs so that we could loop through all categories.

    Jeff

  • 0 Votes
    1 Posts
    194 Views

    The entire error below. I've been searching for some clues, but coming up empty handed and hoping someone can help. This is a fresh install on a debian 10 server.

    2020-04-17T16:33:02.636Z [26376] - error: [build] admin control panel styles build failed 2020-04-17T16:33:02.639Z [26376] - error: resource 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700' gave this Error: Error: socket hang up {"type":"File","filename":"/var/www/nodebb/nodebb/public/less/admin/paper/bootswatch.less","index":87,"line":5,"column":0,"callLine":null,"extract":["","@import url(\"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700\");",""]} ==================================================================================================================================== 2020-04-17T16:33:02.647Z [26376] - error: resource 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700' gave this Error: Error: socket hang up {"type":"File","filename":"/var/www/nodebb/nodebb/public/less/admin/paper/bootswatch.less","index":87,"line":5,"column":0,"callLine":null,"extract":["","@import url(\"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700\");",""]} (node:26376) 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:26376) [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.
  • 0 Votes
    4 Posts
    1k Views

    Indeed its broadcast, thank you. Solved the problem from the client side and moved on. Thank you very very much!!!

  • 0 Votes
    2 Posts
    2k Views

    Definitely seems like cache issue with the record for express-session.
    try sudo npm cache clean? After that try manually clearing the cache files?