install error, centered on share module

Technical Support
  • Hi,
    I am stuck on installing nodebb.
    Is there a solution to move past this (see screen shot)?

    I am using a ubuntu 18 vm on azure- its brand new, started from scratch.
    I am following this guide: https://docs.nodebb.org/installing/os/ubuntu/

    Thanks!
    2e6ac816-ab3a-493a-b688-c0a7599ccc81-image.png

    xx@d:/opt/nodebb$ sudo ./nodebb setup
    package.json not found.
    Populating package.json...
    OK
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    
    > [email protected] install /opt/nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    
    > [email protected] install /opt/nodebb/node_modules/benchpressjs/rust/benchpress-rs
    > neon build >> build.log 2>&1 || exit 0
    
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 86 packages from 84 contributors in 21.959s
    
    > [email protected] install /opt/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.0/libvips-8.7.0-linux-x64.tar.gz
    ERR! sharp EACCES: permission denied, open '/opt/nodebb/node_modules/sharp/17921-libvips-8.7.0-linux-x64.tar.gz'
    ERR! sharp Please see http://sharp.pixelplumbing.com/page/install
    gyp ERR! configure error
    gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/nodebb/node_modules/sharp/build'
    gyp ERR! System Linux 4.15.0-1035-azure
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /opt/nodebb/node_modules/sharp
    gyp ERR! node -v v11.6.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    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/da/.npm/_logs/2019-01-06T21_08_28_322Z-debug.log
    Error installing dependencies!
    message: Command failed: npm install --production
    stdout: null
    stderr: null
    /opt/nodebb/src/cli/package-install.js:54
                    throw e;
                    ^
    
    Error: Command failed: npm install --production
        at checkExecSyncError (child_process.js:622:11)
        at Object.execSync (child_process.js:659:13)
        at Object.installAll (/opt/nodebb/src/cli/package-install.js:45:9)
        at Object.<anonymous> (/opt/nodebb/src/cli/index.js:58:18)
        at Module._compile (internal/modules/cjs/loader.js:721:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
        at Module.require (internal/modules/cjs/loader.js:657:17)
    da@d:/opt/nodebb$
    
  • Does the user you're using to setup nodebb have all permissions on the subfolders where you're trying to install it? And also, you should read the errors, you can perfectly see it says on the third line of the error:

    ERR! sharp Please see http://sharp.pixelplumbing.com/page/install
    
  • You didn't follow the hide very well, as it does not tell you to run ./nodebb setup with sudo.

  • I recommend you create a new unprivileged user which exists only to run NodeBB, and either install NodeBB in that user's home directory, or give that user ownership over /opt/nodebb.

  • @PitaJ said in install error, centered on share module:

    unprivileged

    Thanks
    I just started over again.
    Now I think that I have gotten a little further. ( not getting my original errors )
    I am getting a new error.

    da@e:~/nodebb$ ./nodebb setup
    package.json not found.
    Populating package.json...
    OK
    Dependencies outdated or not yet installed.
    Installing them now...
    
    npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    npm WARN deprecated [email protected]: This version is no longer maintained. Please upgrade to the latest version.
    
    > [email protected] install /home/da/nodebb/node_modules/benchpressjs
    > cd rust/benchpress-rs && npm install
    
    
    > [email protected] install /home/da/nodebb/node_modules/benchpressjs/rust/benchpress-rs
    > neon build >> build.log 2>&1 || exit 0
    
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 86 packages from 84 contributors and audited 123 packages in 5.274s
    found 0 vulnerabilities
    
    
    > [email protected] install /home/da/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.0/libvips-8.7.0-linux-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=11.6.0 runtime=node arch=x64 platform=linux)
    make: Entering directory '/home/da/nodebb/node_modules/sharp/build'
      TOUCH Release/obj.target/libvips-cpp.stamp
      CXX(target) Release/obj.target/sharp/src/common.o
      CXX(target) Release/obj.target/sharp/src/metadata.o
      CXX(target) Release/obj.target/sharp/src/stats.o
      CXX(target) Release/obj.target/sharp/src/operations.o
      CXX(target) Release/obj.target/sharp/src/pipeline.o
      CXX(target) Release/obj.target/sharp/src/sharp.o
      CXX(target) Release/obj.target/sharp/src/utilities.o
      SOLINK_MODULE(target) Release/obj.target/sharp.node
      COPY Release/sharp.node
    make: Leaving directory '/home/da/nodebb/node_modules/sharp/build'
    
    > [email protected] postinstall /home/da/nodebb/node_modules/preact
    > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')"
    
    Love Preact? You can now donate to our open collective:
     > https://opencollective.com/preact/donate
    npm notice created a lockfile as package-lock.json. You should commit this file.
    added 628 packages from 748 contributors and audited 4317 packages in 72.67s
    found 5 vulnerabilities (1 low, 4 moderate)
      run `npm audit fix` to fix them, or `npm audit` for details
    OK
    
    internal/modules/cjs/loader.js:605
        throw err;
        ^
    
    Error: Cannot find module '@babel/runtime/core-js/object/create'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
        at Function.Module._load (internal/modules/cjs/loader.js:529:25)
        at Module.require (internal/modules/cjs/loader.js:657:17)
        at require (internal/modules/cjs/helpers.js:22:18)
        at Object.<anonymous> (/home/da/nodebb/node_modules/xregexp/lib/xregexp.js:10:38)
        at Module._compile (internal/modules/cjs/loader.js:721:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
        at Module.load (internal/modules/cjs/loader.js:620:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
        at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    da@e:~/nodebb$
    
  • That's a very odd error. One I haven't ever seen before. I recommend trying this:

    npm install
    ./nodebb setup
    
  • @PitaJ Thanks. I was seeing the same "Error: Cannot find module '@babel/runtime/core-js/object/create'" issue and deleting my node_modules directory and then running

    npm install
    ./nodebb setup
    

    solved the problem for me.


Suggested Topics


  • Login error

    Unsolved Technical Support
    0 Votes
    8 Posts
    888 Views

    @ushi said in Login error:

    When I try to log in, I get such an error message
    "Login failed
    We are unable to connect you to the system, as it has been too long. please try again."
    What to do?

    I'll explain what the problem is,
    Apparently the forum server is too slow and did not load the ssl certificate.
    So you need to change the "http: //" in the url "https: //" and then try to connect again ... (I also translate from Hebrew, maybe you should add a category in Hebrew ...)

  • 0 Votes
    1 Posts
    710 Views

    I hope it helps someone:

    I wanted to do this, so I landed upon this thread. I had already created nginx proxy for my domain. So I basically just added /discuss (or whatever location you want)

    server { listen 443; listen [::]:443; server_name site.com; access_log off; error_log /var/log/nginx/site.com-error.log; open_file_cache max=2000 inactive=20s; open_file_cache_valid 60s; open_file_cache_min_uses 5; open_file_cache_errors off; ###################################################################### ## SSL Configuration ## ## Only use this block if you are setting up the SSL (HTTPS) server ## definition of your site. ###################################################################### ssl on; ssl_certificate /etc/letsencrypt/live/site/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/site/privkey.pem; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; location /discuss { proxy_pass http://127.0.0.1:4567/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } # Custom 404 error_page 404 = /404.html; }

    However, there are many other issues.

    If I specify in config.json url as site.com/forum or something, css files don't load.

    If I don't, if you click on anything, it will try to go to site.com/post/2/something instead of site.com/forum/post/2 etc.

  • 0 Votes
    6 Posts
    3k Views

    This is old, and the owner hasn't replied. Create a new topic if still an issue.

  • 0 Votes
    20 Posts
    6k Views

    @AOKP nothing really to share with the site yet, but if you're asking about the issue, this is what I'm struggling with.

  • 0 Votes
    8 Posts
    3k Views

    @Arindam-sarkar remember: you need open firewall config for default nodebb port

    favicon

    (nodebb.readthedocs.io)

    Assuming you kept the default port setting, you need to allow it through the firewall.
    firewall-cmd --zone=public --add-port=4567/tcp --permanent
    firewall-cmd --reload