title: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError:
body: <p>Need desperate help! :alert:
  I have been trying to debug an app for the last 3 days and now I’m very stuck here.It works on my localhost but brakes on production. Mainly, my biggest mistake was that I’ve coded a lot on my machine besides sending it to production little by little.  I’ve already moved from errors to errors but with no final success. I’ve installed webpack at one point and I think I shouldn’t but now I can’t get rid of it. When I try to
  rake assets:precompile
  that’s what I get:</p>
  <pre><code>Running via Spring preloader in process 82485
  </code></pre>
  <p>Calling <code>DidYouMean::SPELL_CHECKERS.merge!(error_name =&gt; spell_checker)' has been deprecated. Please call </code>DidYouMean.correct_error(error_name, spell_checker)' instead.
  yarn install v1.22.19
  warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
  [1/5]   Validating package.json...
  [2/5]   Resolving packages...
  success Already up-to-date.
  ✨  Done in 0.27s.
  Calling <code>DidYouMean::SPELL_CHECKERS.merge!(error_name =&gt; spell_checker)' has been deprecated. Please call </code>DidYouMean.correct_error(error_name, spell_checker)' instead.
  yarn run v1.22.19
  $ webpack --config ./config/webpack/webpack.config.js
  assets by status 0 bytes [cached] 1 asset
  Entrypoint application =
  Entrypoint custom = custom.js
  orphan modules 39 bytes [orphan] 1 module
  ./app/assets/stylesheets/application.scss 39 bytes [built] [code generated] [1 error]</p>
  <p>WARNING in configuration
  The 'mode' option has not been set, webpack will fallback to 'production' for this value.
  Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
  You can also set it to 'none' to disable any default behavior. Learn more: <a href="https://webpack.js.org/configuration/mode/" rel="nofollow noreferrer">https://webpack.js.org/configuration/mode/</a></p>
  <p>ERROR in ./app/assets/stylesheets/application.scss (./app/assets/stylesheets/application.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./app/assets/stylesheets/application.scss)
  Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
  SassError: Can't find stylesheet to import.
  ╷
  10 │ @import &quot;font-awesome&quot;;
  │         ^^^^^^^^^^^^^^
  ╵
  app/assets/stylesheets/application.scss 10:9  root stylesheet
  @ ./app/assets/stylesheets/application.scss</p>
  <p>ERROR in ./app/assets/stylesheets/application.scss
  Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
  HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
  SassError: Can't find stylesheet to import.
  ╷
  10 │ @import &quot;font-awesome&quot;;
  │         ^^^^^^^^^^^^^^
  ╵
  app/assets/stylesheets/application.scss 10:9  root stylesheet
  at tryRunOrWebpackError (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/HookWebpackError.js:88:9)
  at <strong>webpack_require_module</strong> (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12)
  at <strong>webpack_require</strong> (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5012:18)
  at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5083:20
  at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3485:9)
  at done (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3527:9)
  at Hook.eval [as callAsync] (eval at create (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
  at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/Hook.js:18:14)
  at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:4990:43
  at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3482:9)
  -- inner error --
  Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
  SassError: Can't find stylesheet to import.
  ╷
  10 │ @import &quot;font-awesome&quot;;
  │         ^^^^^^^^^^^^^^
  ╵
  app/assets/stylesheets/application.scss 10:9  root stylesheet
  at Object. (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/css-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/sass-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/app/assets/stylesheets/application.scss:1:7)
  at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:441:11
  at Hook.eval [as call] (eval at create (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/HookCodeFactory.js:19:10), :7:1)
  at Hook.CALL_DELEGATE [as _call] (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/tapable/lib/Hook.js:14:14)
  at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5057:39
  at tryRunOrWebpackError (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/HookWebpackError.js:83:7)
  at <strong>webpack_require_module</strong> (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12)
  at <strong>webpack_require</strong> (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5012:18)
  at /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5083:20
  at symbolIterator (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/neo-async/async.js:3485:9)</p>
  <p>Generated code for /Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/css-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/sass-loader/dist/cjs.js!/Users/ju-arrighi/code/Ju-Arrighi/utero/app/assets/stylesheets/application.scss
  1 | throw new Error(&quot;Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nSassError: Can't find stylesheet to import.\n   ╷\n10 │ @import &quot;font-awesome&quot;;\n   │         ^^^^^^^^^^^^^^\n   ╵\n  app/assets/stylesheets/application.scss 10:9  root stylesheet&quot;);</p>
  <p>ERROR in application
  Module not found: Error: Can't resolve './app/assets/javascripts/application.js' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'</p>
  <p>ERROR in custom
  Module not found: Error: Can't resolve './app/assets/stylesheets/custom.scss' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'</p>
  <p>3 errors have detailed information that is not shown.
  Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.</p>
  <p>webpack 5.74.0 compiled with 4 errors and 1 warning in 4098 ms
  error Command failed with exit code 1.
  info Visit <a href="https://yarnpkg.com/en/docs/cli/run" rel="nofollow noreferrer">https://yarnpkg.com/en/docs/cli/run</a> for documentation about this command.
  rake aborted!
  jsbundling-rails: Command build failed, ensure yarn is installed and <code>yarn build</code> runs without errors
  internal:/Users/ju-arrighi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in <code>require' &lt;internal:/Users/ju-arrighi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb&gt;:85:in </code>require'
  -e:1:in `'
  Tasks: TOP =&gt; assets:precompile =&gt; javascript:build
  (See full trace by running task with --trace)</p>