Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Error npm run serve

    Scheduled Pinned Locked Moved Solved
    Duet Web Control
    3
    6
    765
    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.
    • amimafeundefined
      amimafe
      last edited by

      Hi,

      I am trying to compile the DWC source code but when I launch the command "npm run serve" I get the following error.
      What is the reason? Can someone help me?

      Thank you very much.

      0d0a8992-8ba9-458c-8ed2-0e976521f658-image.png

      chrishammundefined 2 Replies Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @amimafe
        last edited by

        @amimafe What branch are you trying to build? Try to run npm install before npm run serve.

        Duet software engineer

        amimafeundefined 1 Reply Last reply Reply Quote 0
        • Nitroxidundefined
          Nitroxid
          last edited by

          Hi,

          i've the same problem on Ubuntu 22.04 running node v21.0.0.

          I cloned the repo from git (master) and installed it with npm install then executed npm run serve. The server compiles the files, and eventually displays the same error OP encountered.

          In addtion a more extensive error is given, when I try to access the server, see screenshotScreenshot 2023-10-20 at 13-31-07 Duet Web Control.png

          Looking at line 91335 in sass.dart.js shows, that navigator.userAgent seems to be undefined.

          Sadly I'm pretty new to Node/Vue so I'm not really sure, what to do next.
          Any suggestions? Thanks for the great work btw.

          1 Reply Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @amimafe
            last edited by

            @amimafe @Nitroxid I could build the master branch immediately after cloning it without any additional changes. But I am still on Node 20, perhaps that makes a difference:

            > npm -v
            10.2.1
            > node -v
            v20.8.1
            

            Also note that v3.4 and older require NODE_OPTIONS="--openssl-legacy-provider" to be set (as mentioned in the README) due to an incompatibility with Webpack 4. This option will be obsolete in v3.5.

            Duet software engineer

            Nitroxidundefined 1 Reply Last reply Reply Quote 0
            • Nitroxidundefined
              Nitroxid @chrishamm
              last edited by

              @chrishamm Thanks for the help. I got it working with Node 20.8.1.

              First I reinstalled it, by deleting node_modules and running npm install again. And after setting NODE_OPTIONS, npm run serve worked.

              1 Reply Last reply Reply Quote 0
              • amimafeundefined
                amimafe @chrishamm
                last edited by

                @chrishamm Thanks for your help. I was finally able to compile using an older version of Node.js. Version 18.18
                I want to modify some DWC parameters to suit our machine.
                I hope this can help other users with the same problem.

                1 Reply Last reply Reply Quote 0
                • amimafeundefined amimafe marked this topic as a question
                • amimafeundefined amimafe has marked this topic as solved
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA