Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-2277

Karma tests fail on Github Actions CI with Node v14 and v16 LTS

    XMLWordPrintable

Details

    • ERM Sprint 144
    • Bienenvolk
    • TBD

    Description

       

      The karma tests fail before starting after implementing Github Actions. Step fails for both Node v14 and v16 in the following repositories:

      • ui-erm-comparisons  (yarn test fails for both Node 14 and 16 issue with karma tests)
      • ui-local-kb-admin  (yarn test fails for both Node 14 and 16 issue with karma tests)
      • ui-plugin-find-eresource  (yarn test fails for both Node 14 and 16 issue with karma tests)

      The following error appears:

       

      Starting Karma tests...
      2324START:
      2510 07 2022 08:17:19.232:WARN [filelist]: All files matched by "/tmp/_karma_webpack_696104/**/*" were excluded or matched by prior matchers.
      26Webpack bundling...
      2710 07 2022 08:17:19.764:ERROR [karma-server]: UnhandledRejection: Error: Could not find the npm peerDependency "favicons".
      28Please run:
      29npm i favicons
      30 - or -
      31yarn add favicons
      3233Error: 
      34Something went wrong installing the "sharp" module
      3536Cannot find module '../build/Release/sharp.node'
      37Require stack:
      38- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/sharp/lib/constructor.js
      39- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/sharp/lib/index.js
      40- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/favicons/dist/helpers.js
      41- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/favicons/dist/index.js
      42- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/favicons-webpack-plugin/src/index.js
      43- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-webpack/webpack/stripes-branding-plugin.js
      44- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-webpack/webpack/stripes-webpack-plugin.js
      45- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/lib/cli/stripes-core.js
      46- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/lib/commands/test/karma.js
      47- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/lib/commands/test.js
      48- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/node_modules/yargs/build/index.cjs
      49- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/node_modules/yargs/yargs
      50- /home/runner/work/ui-plugin-find-eresource/ui-plugin-find-eresource/node_modules/@***/stripes-cli/lib/stripes-cli.js
      5152- Remove the "node_modules/sharp" directory then run
      53  "npm install --ignore-scripts=false --verbose sharp" and look for errors
      54- Consult the installation documentation at https://sharp.pixelplumbing.com/install55- Search for this error at https://github.com/lovell/sharp/issues 

      Two other repos had the same issue but were solved in the following two PRs here and this one

       

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                ankitasen Ankita Sen
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases