Help upgrading

Technical Support
  • So I went with an image it's one behind and I follow the upgrade instruction and I place

     git reset --hard origin/1.12.2
    

    And I get this error unknown revision of path not in the working tree how do I get around this to fix this

  • It should be origin/v1.12.2, notice the "v"

  • @PitaJ same issue even with the V

  • this is the error Im getting

    fatal: ambiguous argument 'origin/v1.12.2': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    
  • got the update to kinda work Now Im getting these fails

    I tried running this as sudo and non sudo (non sudo i get premission denied) AND IT BROKE MY SITE

    
    > [email protected] install /home/ubuntu/nodebb/node_modules/sharp
    > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
    
    info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz
    ERR! sharp EACCES: permission denied, open '/home/ubuntu/nodebb/node_modules/sharp/2812-libvips-8.7.4-linux-x64.tar.gz'
    info sharp Attempting to build from source via node-gyp but this may fail due to the above error
    info sharp Please see https://sharp.pixelplumbing.com/page/install for required dependencies
    gyp ERR! configure error 
    gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/ubuntu/nodebb/node_modules/sharp/build'
    gyp ERR! System Linux 4.15.0-1035-aws
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/ubuntu/nodebb/node_modules/sharp
    gyp ERR! node -v v10.15.3
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/ubuntu/.npm/_logs/2019-08-02T03_58_49_364Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    2019-08-02T03:58:49.390Z [4567/2791] - error: uncaughtException: Command failed: npm install --production
    Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:616:11)
        at Object.execSync (child_process.js:653:13)
        at Object.installAll (/home/ubuntu/nodebb/src/cli/package-install.js:45:9)
        at Object.handler (/home/ubuntu/nodebb/src/cli/upgrade.js:26:19)
        at /home/ubuntu/nodebb/src/cli/upgrade.js:59:22
        at /home/ubuntu/nodebb/node_modules/async/dist/async.js:3880:24
        at replenish (/home/ubuntu/nodebb/node_modules/async/dist/async.js:1011:17)
        at /home/ubuntu/nodebb/node_modules/async/dist/async.js:1016:9
        at eachOfLimit (/home/ubuntu/nodebb/node_modules/async/dist/async.js:1041:24)
        at /home/ubuntu/nodebb/node_modules/async/dist/async.js:1046:16 {"error":{"status":1,"signal":null,"output":[null,null,null],"pid":2798,"stdout":null,"stderr":null},"stack":"Error: Command failed: npm install --production\n    at checkExecSyncError (child_process.js:616:11)\n    at Object.execSync (child_process.js:653:13)\n    at Object.installAll (/home/ubuntu/nodebb/src/cli/package-install.js:45:9)\n    at Object.handler (/home/ubuntu/nodebb/src/cli/upgrade.js:26:19)\n    at /home/ubuntu/nodebb/src/cli/upgrade.js:59:22\n    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:3880:24\n    at replenish (/home/ubuntu/nodebb/node_modules/async/dist/async.js:1011:17)\n    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:1016:9\n    at eachOfLimit (/home/ubuntu/nodebb/node_modules/async/dist/async.js:1041:24)\n    at /home/ubuntu/nodebb/node_modules/async/dist/async.js:1046:16","exception":true,"date":"Fri Aug 02 2019 03:58:49 GMT+0000 (Coordinated Universal Time)","process":{"pid":2791,"uid":0,"gid":0,"cwd":"/home/ubuntu/nodebb","execPath":"/usr/bin/node","version":"v10.15.3","argv":["/usr/bin/node","/home/ubuntu/nodebb/nodebb","upgrade"],"memoryUsage":{"rss":60760064,"heapTotal":37564416,"heapUsed":25235792,"external":1112135}},"os":{"loadavg":[0.68603515625,0.33935546875,0.1943359375],"uptime":1683},"trace":[{"column":11,"file":"child_process.js","function":"checkExecSyncError","line":616,"method":null,"native":false},{"column":13,"file":"child_process.js","function":"Object.execSync","line":653,"method":"execSync","native":false},{"column":9,"file":"/home/ubuntu/nodebb/src/cli/package-install.js","function":"Object.installAll","line":45,"method":"installAll","native":false},{"column":19,"file":"/home/ubuntu/nodebb/src/cli/upgrade.js","function":"Object.handler","line":26,"method":"handler","native":false},{"column":22,"file":"/home/ubuntu/nodebb/src/cli/upgrade.js","function":null,"line":59,"method":null,"native":false},{"column":24,"file":"/home/ubuntu/nodebb/node_modules/async/dist/async.js","function":null,"line":3880,"method":null,"native":false},{"column":17,"file":"/home/ubuntu/nodebb/node_modules/async/dist/async.js","function":"replenish","line":1011,"method":null,"native":false},{"column":9,"file":"/home/ubuntu/nodebb/node_modules/async/dist/async.js","function":null,"line":1016,"method":null,"native":false},{"column":24,"file":"/home/ubuntu/nodebb/node_modules/async/dist/async.js","function":"eachOfLimit","line":1041,"method":null,"native":false},{"column":16,"file":"/home/ubuntu/nodebb/node_modules/async/dist/async.js","function":null,"line":1046,"method":null,"native":false}]}
    
  • You have managed to mess up the file permissions in the NodeBB directory. You should always execute ./nodebb, npm, and git commands under the same unprivileged user, which means no sudo.

    You will need to recursively chown the nodebb directory back over to whatever unprivileged user should own it.

    What upgrade instructions are you trying to follow?


Suggested Topics


  • 0 Votes
    2 Posts
    253 Views

    Try disabling the custom plugins and see if it helps.

  • 0 Votes
    5 Posts
    463 Views

    Thank you, it worked 🙂

  • Composer help modal window

    Solved Technical Support
    0 Votes
    3 Posts
    545 Views

    @MJ thx bro) very helpful.

    Now is ok.

  • 0 Votes
    28 Posts
    3k Views

    @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!

  • 0 Votes
    5 Posts
    3k Views

    @baris said:

    The error message is telling you that it can't access/save the file. Make sure the user you are running the commands has the proper permissions.

    I wondered that too, I was using a user I specifically created for this task in order to not use the root user as I thought it was not a good practice to do. Especially since the instructions indicate a sudo user. Usually I can figure out permission issues, but for some reason I have not been able to solve this one. The installation does get further when using the root user, so there is definitely a permission issue.

    The error I get now is related to the connection of the Redis database. I get a connection refused error when using the IP of the server.

    The abort error shows the IP address and default port number so I have no idea how to connect the database.

    Here's the latest console information ...

    [email protected] node_modules/connect-redis └── [email protected] ([email protected]) 25/4 19:08 [21628] - info: Populating database with default configs, if not already set... 25/4 19:08 [21628] - error: Error: Redis connection to myserverIP:6379 failed - connect ECONNREFUSED at RedisClient.flush_and_error (/mydomainpath/nodebb/node_modules/redis/index.js:142:13) at RedisClient.on_error (/mydomainpath/nodebb/node_modules/redis/index.js:180:10) at Socket.<anonymous> (/mydomainpath/nodebb/node_modules/redis/index.js:95:14) at Socket.EventEmitter.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:415:13) 25/4 19:08 [21628] - warn: NodeBB Setup Aborted. Redis connection to myserverIP:6379 failed - connect ECONNREFUSED

    Thanks ... Pops