XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Installing xo-cli on new VM

    Scheduled Pinned Locked Moved Solved Management
    3 Posts 2 Posters 655 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nick.lloydN Offline
      nick.lloyd
      last edited by

      Howdy!

      I'm trying to install xo-cli on a new Ubuntu 22.02 VM. I don't need the full XO, just the cli. I've installed NPM, and did sudo npm install -g xo-cli, but when I try to run xo-cli register..., it returns ths:

      internal/process/esm_loader.js:74
          internalBinding('errors').triggerUncaughtException(
                                    ^
      
      Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'fs' imported from /usr/local/lib/node_modules/xo-cli/index.mjs
          at packageResolve (internal/modules/esm/resolve.js:664:9)
          at moduleResolve (internal/modules/esm/resolve.js:705:18)
          at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:798:11)
          at Loader.resolve (internal/modules/esm/loader.js:100:40)
          at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
          at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:47:40)
          at link (internal/modules/esm/module_job.js:46:36) {
        code: 'ERR_MODULE_NOT_FOUND'
      }
      

      Am I missing something I need to install? I've had this happen before on a Rocky 9 VM as well, but someone else had fixed that for me.

      1 Reply Last reply Reply Quote 0
      • nick.lloydN Offline
        nick.lloyd @olivierlambert
        last edited by

        That's what it was. For whatever reason, ubuntu defaults to installing these versions for node and npm respectively:
        v12.22.9
        8.5.1

        Following the steps here fixed it. As always, thanks!!

        1 Reply Last reply Reply Quote 1
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          fs is a native package in Node, so it's very weird. Double check you are using Node LTS and if you spot any install error.

          nick.lloydN 1 Reply Last reply Reply Quote 0
          • nick.lloydN Offline
            nick.lloyd @olivierlambert
            last edited by

            That's what it was. For whatever reason, ubuntu defaults to installing these versions for node and npm respectively:
            v12.22.9
            8.5.1

            Following the steps here fixed it. As always, thanks!!

            1 Reply Last reply Reply Quote 1
            • olivierlambertO olivierlambert marked this topic as a question on
            • olivierlambertO olivierlambert has marked this topic as solved on

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post