Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3431

Console extension without an exposedModules fails to build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Extensions
    • None
    • False
    • None
    • False

      I have a console extension (https://github.com/gnunn1/dev-console-plugin) that simply adds the Topology and Add+ views to the Admin perspective but otherwise should expose no modules. However if I try to build this extension without an exposedModules the webpack assembly fails with the stack trace below.

      As a workaround I'm leaving in the example module from the template and just removing it from being added it to the OpenShift menu.

      $ yarn run build                                                                                                                                                                                                            main 
      yarn run v1.22.19
      $ yarn clean && NODE_ENV=production yarn ts-node node_modules/.bin/webpack
      $ rm -rf dist
      $ ts-node -O '\{"module":"commonjs"}' node_modules/.bin/webpack
      [webpack-cli] HookWebpackError: Called Compilation.updateAsset for not existing filename plugin-entry.js
          at makeWebpackError (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/HookWebpackError.js:48:9)
          at /home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:3058:12
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:41:1)
          at fn (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:479:17)
          at _next0 (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:39:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:52:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
      -- inner error --
      Error: Called Compilation.updateAsset for not existing filename plugin-entry.js
          at Compilation.updateAsset (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:4298:10)
          at /home/gnunn/Development/openshift/dev-console-plugin/node_modules/src/webpack/ConsoleAssetPlugin.ts:82:23
          at fn (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:477:10)
          at _next0 (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:39:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:52:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
      caused by plugins in Compilation.hooks.processAssets
      Error: Called Compilation.updateAsset for not existing filename plugin-entry.js
          at Compilation.updateAsset (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:4298:10)
          at /home/gnunn/Development/openshift/dev-console-plugin/node_modules/src/webpack/ConsoleAssetPlugin.ts:82:23
          at fn (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/webpack/lib/Compilation.js:477:10)
          at _next0 (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:39:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:52:1)
          at eval (eval at create (/home/gnunn/Development/openshift/dev-console-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:13:1)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
      error Command failed with exit code 2.
      info Visit 
      {{[https://yarnpkg.com/en/docs/cli/run]}}
       for documentation about this command.
      error Command failed with exit code 2.
      info Visit 
      {{[https://yarnpkg.com/en/docs/cli/run]}}
       for documentation about this command.
      

       

              vszocs@redhat.com Vojtech Szocs
              gnunn@redhat.com Gerald Nunn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: