Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The compile-app-settings action crash with the error Module not found: Error: Can't resolve 'eslint-loader' #593

Closed
m5r opened this issue Dec 14, 2023 · 1 comment
Labels
released Type: Bug Fix something that isn't working as intended

Comments

@m5r
Copy link
Contributor

m5r commented Dec 14, 2023

Describe the bug
The compile-app-settings action crash with the error Module not found: Error: Can't resolve 'eslint-loader'

To Reproduce
Steps to reproduce the behavior:

  1. Run the compile-app-settings action on the default config from cht-core
  2. See error

You can fix the error by installing eslint-loader@3.0.4 (the same version used by cht-conf in the config directory but that's cumbersome

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Logs from a recent CI run in a cht-core branch using the latest cht-conf: https://github.com/medic/cht-core/actions/runs/7197587499/job/19605536100#step:17:1497
If you look closely, the error being thrown is Module not found: Error: Can't resolve 'eslint-loader' in '/home/runner/work/cht-core/cht-core/config/default'.
eslint-loader is already a dependency of cht-conf but it doesn't seem to resolve its path.

And locally:

INFO Processing config in default.
INFO Actions:
     - compile-app-settings
INFO Starting action: compile-app-settings…
WARN app_settings.json file should not be edited directly.
    Please create a base_settings.json file in app_settings folder and move any manually defined configurations there.
INFO Packaging contact-summary
INFO Hash: 6471a07f161093973ef6
Version: webpack 4.46.0
Child
    Hash: 6471a07f161093973ef6
    Time: 147ms
    Built at: 12/14/2023 5:39:13 PM
                   Asset      Size  Chunks  Chunk Names
    ./contact-summary.js  2.83 KiB       0  main
    Entrypoint main = ./contact-summary.js
    [0] /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/src/contact-summary/lib.js 203 bytes {0} [built]
    [1] /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/src/contact-summary/contact-summary-emitter.js 3.41 KiB {0} [built]

    ERROR in /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/src/contact-summary/lib.js
    Module not found: Error: Can't resolve 'eslint-loader' in '/home/mokhtar/app/medic/cht-core/config/default'
     @ /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/src/contact-summary/lib.js 1:21-60
INFO Error: Webpack errors when building contact-summary
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/src/lib/compilation/package-lib.js:99:25
    at finalCallback (/home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:254:12)
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:277:6
    at done (/home/mokhtar/app/medic/cht-core/node_modules/neo-async/async.js:2931:13)
    at runCompilers (/home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:181:48)
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:188:7
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/MultiCompiler.js:270:7
    at finalCallback (/home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:257:39)
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:273:13
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mokhtar/app/medic/cht-core/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (/home/mokhtar/app/medic/cht-core/node_modules/tapable/lib/Hook.js:154:20)
    at onCompiled (/home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:271:21)
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:681:15
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/mokhtar/app/medic/cht-core/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/home/mokhtar/app/medic/cht-core/node_modules/tapable/lib/Hook.js:154:20)
    at /home/mokhtar/app/medic/cht-core/node_modules/cht-conf/node_modules/webpack/lib/Compiler.js:678:31
ERROR Webpack errors when building contact-summary

Environment

  • Instance: reproduced it locally
  • Client platform: Manjaro
  • cht-conf version: 3.21.0
  • cht-core version: master @ 43a1683944df4c28dc3a7cc026bd98a10da69958
@m5r m5r added the Type: Bug Fix something that isn't working as intended label Dec 14, 2023
@medic-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 3.21.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@m5r m5r closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants