Site not accessible after a "./nodebb upgrade"

Bug Reports
  • After a forever stop, git pull, ./nodebb upgrade and restarting, I can no longer access the site.

    Here's the console output after running ./nodebb upgrade:

    npm WARN package.json [email protected] No repository field.
    npm WARN package.json [email protected] No repository field.
    npm WARN package.json [email protected] No repository field.
    npm WARN package.json [email protected] No repository field.
    npm http GET https://registry.npmjs.org/bcryptjs
    npm http 200 https://registry.npmjs.org/bcryptjs
    npm http GET https://registry.npmjs.org/bcryptjs/-/bcryptjs-0.7.10.tgz
    npm http 200 https://registry.npmjs.org/bcryptjs/-/bcryptjs-0.7.10.tgz
    
    > [email protected] install /var/www/public_html/forum/node_modules/bcrypt
    > node-gyp rebuild
    
    gyp ERR! clean error 
    gyp ERR! stack Error: EACCES, unlink 'build'
    gyp ERR! System Linux 3.11.0-15-generic
    gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /var/www/public_html/forum/node_modules/bcrypt
    gyp ERR! node -v v0.10.25
    gyp ERR! node-gyp -v v0.12.2
    gyp ERR! not ok 
    
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is most likely a problem with the bcrypt package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-gyp rebuild
    npm ERR! You can get their info via:
    npm ERR!     npm owner ls bcrypt
    npm ERR! There is likely additional logging output above.
    npm ERR! System Linux 3.11.0-15-generic
    npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
    npm ERR! cwd /var/www/public_html/forum
    npm ERR! node -v v0.10.25
    npm ERR! npm -v 1.3.24
    npm ERR! code ELIFECYCLE
    npm ERR! 
    npm ERR! Additional logging details can be found in:
    npm ERR!     /var/www/public_html/forum/npm-debug.log
    npm ERR! not ok code 0
    

    Any clues?

  • @baris recommends deleting your node_modules and running npm install again...

  • @julian

    What did I do wrong then?

  • Assuming that resolved the problem?

    Your system doesn't seem to like bcrypt 😄 (We've already removed that package in favour of bcryptjs, so it shouldn't cause any more issues... I hope)

  • @julian

    About to give it a try, but that means losing modifications made to the theme. I know I'll have to back it up, but...

  • Yeah, back up your changes and see what happens if you re-generate node_modules. Good first step is to restore everything back to vanilla NodeBB

  • @julian

    Does it end with npm install or do I have to run another command after that?

  • npm install should be enough... all you're doing is restoring the dependencies... npm install your various other plugins as well, of course.

  • @julian

    Ok, so I did not lose any data except for modifications to footer.tpl and header.tpl of the Lavender theme

  • @planner Glad it worked out okay 🙂


Suggested Topics