'Fail to compile webpack when I run ruby server

I have try to run my ruby server and I got this error :

[Webpacker] Compiling...
[Webpacker] Compilation failed:
/var/lib/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/runner.rb:13:in ``': No such file or directory - yarn (Errno::ENOENT)
    from /var/lib/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/runner.rb:13:in `initialize'
    from /var/lib/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/runner.rb:6:in `new'
    from /var/lib/gems/2.7.0/gems/webpacker-5.2.1/lib/webpacker/runner.rb:6:in `run'
    from ./bin/webpack:17:in `block in <main>'
    from ./bin/webpack:16:in `chdir'
    from ./bin/webpack:16:in `<main>'

I have search how to fix it on the internet but nobody has the same as me. And when I try to update my stylesheet that not works.

Realy don't know where that could come from. And the file where the error is is not file that I have make so I don't dare to edit them.

I have try to remove my node_module folder reinit with yarn but nothing change and I got the same error.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source