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:
Running via Spring preloader in process 82485
Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call 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 DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call 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]
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: https://webpack.js.org/configuration/mode/
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 "font-awesome"; │ ^^^^^^^^^^^^^^ ╵ app/assets/stylesheets/application.scss 10:9 root stylesheet @ ./app/assets/stylesheets/application.scss
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 "font-awesome"; │ ^^^^^^^^^^^^^^ ╵ 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 webpack_require_module (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12) at webpack_require (/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 "font-awesome"; │ ^^^^^^^^^^^^^^ ╵ 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 webpack_require_module (/Users/ju-arrighi/code/Ju-Arrighi/utero/node_modules/webpack/lib/Compilation.js:5055:12) at webpack_require (/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)
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("Module build failed (from ./node_modules/sass-loader/dist/cjs.js):\nSassError: Can't find stylesheet to import.\n ╷\n10 │ @import "font-awesome";\n │ ^^^^^^^^^^^^^^\n ╵\n app/assets/stylesheets/application.scss 10:9 root stylesheet");
ERROR in application Module not found: Error: Can't resolve './app/assets/javascripts/application.js' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'
ERROR in custom Module not found: Error: Can't resolve './app/assets/stylesheets/custom.scss' in '/Users/ju-arrighi/code/Ju-Arrighi/utero'
3 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.74.0 compiled with 4 errors and 1 warning in 4098 ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
rake aborted!
jsbundling-rails: Command build failed, ensure yarn is installed and yarn build 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 require' <internal:/Users/ju-arrighi/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require'
-e:1:in `'
Tasks: TOP => assets:precompile => javascript:build
(See full trace by running task with --trace)