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

    CAnnot get plugin to build with v3.5-dev

    Scheduled Pinned Locked Moved Solved
    Plugins for DWC and DSF
    2
    5
    741
    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.
    • stuartofmtundefined
      stuartofmt
      last edited by stuartofmt

      When I try to build a plugin with 3.5-dev, I get an error ' ERROR No Webpack chunks have be added to the ZIP archive.`. Any idea why? I can build in 3.4.6 OK.
      This is on Win11.

      There is no zip file is created.

      When I first build the dev environment, npm run serve runs without errors.

      After trying to build the plugin: If I try npm run serve again, I get the following error. It seems that the act of trying to build a plugin changes something ...

      C:\Users\stuar\Github\DWCv3.5-dev>npm run serve
      
      > duetwebcontrol@3.5.2-rc.1 serve
      > vue-cli-service serve
      
       INFO  Starting development server...
       ERROR  AssertionError [ERR_ASSERTION]: Missing entry point (index.js, index.ts, dwc-src/index.js, dwc-src/index.ts, src/index.js, src/index.ts) in plugin DuetLapse3
      AssertionError [ERR_ASSERTION]: Missing entry point (index.js, index.ts, dwc-src/index.js, dwc-src/index.ts, src/index.js, src/index.ts) in plugin DuetLapse3
          at C:\Users\stuar\Github\DWCv3.5-dev\webpack\lib\auto-imports-plugin.js:54:17
          at Hook.eval [as call] (eval at create (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:9:1)
          at Hook.CALL_DELEGATE [as _call] (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\node_modules\tapable\lib\Hook.js:14:14)
          at createCompiler (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\lib\webpack.js:86:28)
          at create (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\lib\webpack.js:145:16)
          at webpack (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\lib\webpack.js:173:32)
          at f (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\webpack\lib\index.js:73:16)
          at serve (C:\Users\stuar\Github\DWCv3.5-dev\node_modules\@vue\cli-service\lib\commands\serve.js:185:22)
          at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      

      Full output from plugin build attempt below

      C:\Users\stuar\Github\DWCv3.5-dev>cmd.exe /c npm run build-plugin "../DuetLapse3/pluginv3.5-dev"
      
      > duetwebcontrol@3.5.2-rc.1 build-plugin
      > node scripts/build-plugin.js ../DuetLapse3/pluginv3.5-dev
      
      All browser targets in the browserslist configuration have supported ES module.
      Therefore we don't build two separate bundles for differential loading.
      
      
      /  Building for production...[BABEL] Note: The code generator has deoptimised the styling of C:\Users\stuar\Github\DWCv3.5-dev\node_modules\vuetify\dist\vuetify.js as it exceeds the max of 500KB.
      -  Building for production...
      
       DONE  Compiled successfully in 236835ms                                                                      1:56:47 PM
        File                                        Size                                Gzipped
      
        dist\js\monaco-editor.54de9d18.js           4748.92 KiB                         1058.10 KiB
        dist\js\app.fc942cc4.js                     3764.19 KiB                         816.44 KiB
        dist\js\GCodeViewer.2c2d2e4a.js             2699.53 KiB                         590.23 KiB
        dist\js\HeightMap.0a7868ce.js               1464.97 KiB                         316.40 KiB
        dist\js\OnScreenKeyboard.08821710.js        106.99 KiB                          33.03 KiB
        dist\js\InputShaping.3edf6046.js            81.09 KiB                           17.29 KiB
        dist\js\ObjectModelBrowser.b7c78d60.js      25.50 KiB                           6.78 KiB
        dist\workbox-6567b62a.js                    14.11 KiB                           4.93 KiB
        dist\js\monaco-json-worker.1cd76b1b.js      2.80 KiB                            1.01 KiB
        dist\js\monaco-worker.6d781179.js           2.79 KiB                            1.00 KiB
        dist\service-worker.js                      2.16 KiB                            1.01 KiB
        dist\css\app.1e72278e.css                   768.96 KiB                          107.11 KiB
        dist\css\monaco-editor.bda37737.css         112.91 KiB                          18.12 KiB
        dist\css\GCodeViewer.5c28e225.css           14.26 KiB                           2.96 KiB
        dist\css\ObjectModelBrowser.562feac3.css    6.60 KiB                            1.24 KiB
        dist\css\OnScreenKeyboard.425af7fa.css      3.53 KiB                            1.13 KiB
        dist\css\HeightMap.6241cfd5.css             0.49 KiB                            0.24 KiB
        dist\css\InputShaping.bd3578ab.css          0.44 KiB                            0.24 KiB
      
        Images and other types of assets omitted.
        Build at: 2024-06-10T19:56:48.845Z - Hash: 030dae31db75d394 - Time: 236835ms
      
       DONE  Build complete. The dist directory is ready to be deployed.
       INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
      
       ERROR  No Webpack chunks have be added to the ZIP archive. Make sure it is imported by src/plugins/index.ts
      
      
      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @stuartofmt
        last edited by

        @stuartofmt Works on my machine ¯_(ツ)_/¯

        DuetWebControl (v3.5-dev)> npm run build-plugin /tmp/DuetLapse3/plugin\ 3.5.0-rc.1
         DONE  Compiled successfully in 38972ms                                                                                                                                              10:42:09 AM
        
          File                                        Size                                                                    Gzipped
        
          dist/js/monaco-editor.54de9d18.js           4748.92 KiB                                                             1059.14 KiB
          dist/js/app.7fe0f815.js                     3756.81 KiB                                                             816.91 KiB
          dist/js/GCodeViewer.3503fc35.js             2699.13 KiB                                                             590.56 KiB
          dist/js/HeightMap.e9be5939.js               1464.89 KiB                                                             316.49 KiB
          dist/js/OnScreenKeyboard.4868047e.js        106.91 KiB                                                              33.02 KiB
          dist/js/InputShaping.29011313.js            80.69 KiB                                                               17.24 KiB
          dist/js/ObjectModelBrowser.5cc7623a.js      25.42 KiB                                                               6.81 KiB
          dist/workbox-6567b62a.js                    14.11 KiB                                                               4.93 KiB
          dist/js/DuetLapse3.42bb1c87.js              5.57 KiB                                                                1.64 KiB
          dist/js/monaco-json-worker.1cd76b1b.js      2.80 KiB                                                                1.01 KiB
          dist/js/monaco-worker.6d781179.js           2.79 KiB                                                                1.00 KiB
          dist/service-worker.js                      2.32 KiB                                                                1.07 KiB
          dist/css/app.ef12892b.css                   768.96 KiB                                                              107.11 KiB
          dist/css/monaco-editor.bda37737.css         112.91 KiB                                                              18.13 KiB
          dist/css/GCodeViewer.eeec8def.css           14.26 KiB                                                               2.96 KiB
          dist/css/ObjectModelBrowser.562feac3.css    6.60 KiB                                                                1.24 KiB
          dist/css/OnScreenKeyboard.df360b5d.css      3.53 KiB                                                                1.13 KiB
          dist/css/HeightMap.a997084c.css             0.49 KiB                                                                0.24 KiB
          dist/css/InputShaping.3cce14a7.css          0.44 KiB                                                                0.24 KiB
          dist/css/DuetLapse3.6e428bb0.css            0.15 KiB                                                                0.12 KiB
        
          Images and other types of assets omitted.
          Build at: 2024-06-11T08:42:09.619Z - Hash: 4b71838674ac59bd - Time: 38972ms
        
         DONE  Build complete. The dist directory is ready to be deployed.
         INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
               
         DONE  Plugin ZIP file written to dist/DuetLapse3-5.3.3.zip
        

        Duet software engineer

        stuartofmtundefined 1 Reply Last reply Reply Quote 0
        • stuartofmtundefined
          stuartofmt @chrishamm
          last edited by

          @chrishamm

          I'm cannot figure out what's actually going on ...
          This call .run("build", {}, ["build"]) (near the start of the build-plugin.js script) does not create files for the plugin in the dist/css/ or dist/js/ directory. This, obviously causes a downstream failure, specifically no zip file being created.

          The script goes through the "Building for production" dance BUT does not report any errors.

          Anyway to modify the script so that it reports errors ?

          stuartofmtundefined 1 Reply Last reply Reply Quote 0
          • stuartofmtundefined
            stuartofmt @stuartofmt
            last edited by

            @chrishamm

            Figured it out. I omitted src/index.js for the plugin (possibly during a copy / paste) . The build thought it had suceeded but it failed silently.

            stuartofmtundefined 1 Reply Last reply Reply Quote 0
            • dc42undefined dc42 marked this topic as a question
            • dc42undefined dc42 has marked this topic as solved
            • stuartofmtundefined
              stuartofmt @stuartofmt
              last edited by stuartofmt

              @chrishamm

              I took the liberty of adding some additional checks / logging to build-plugin.js. Warns if the plugin src/index.js file is missing. Hopefully helpful:

              build-plugin.js

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA