Error: Cannot find module 'uglify-es' since upgrading to 1.8.1



  • Hello all,

    I just upgraded my forum instance from 1.8.0 to 1.8.1. I am now unable to start the forum.

    I get the following error:

    [cluster] Spinning up another process...
    2018-04-29T23:34:58.363Z [15609] - info: Initializing NodeBB v1.8.1 https://friendos.club
    2018-04-29T23:34:59.119Z [15609] - error:  Error: Cannot find module 'uglify-es'
        at Function.Module._resolveFilename (module.js:547:15)
        at Function.Module._load (module.js:474:25)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (/var/www/friendos.club/src/meta/minifier.js:5:14)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
    module.js:549
        throw err;
        ^
    
    Error: Cannot find module 'uglify-es'
        at Function.Module._resolveFilename (module.js:547:15)
        at Function.Module._load (module.js:474:25)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (/var/www/friendos.club/src/meta/minifier.js:5:14)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
    [cluster] Child Process (15609) has exited (code: 7, signal: null)
    

    I followed the upgrade guide, then had this problem. Since then, I've tried the following fixes:

    • npm install --production
    • rm -rf node_modules; npm install --production
    • npm i uglify-es (404 Not Found: uglify-es@latest)
    • sudo chown -R www-data:www-data /var/www/friendos.club

    I'm not sure what I can do to fix this problem. Any help would be appreciated. Thank you.



  • Update: Even though the upgrade docs say to skip step 4 if running a minor upgrade, I executed ./nodebb upgrade. That fixed my issue.


  • Global Moderator

    @ralphorama which upgrade docs say that?


  • Admin

    I think running ./nodebb upgrade is actually applicable to all NodeBB versions now. Should make the appropriate changes to docs @PitaJ ...


 

| |