Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn cannot find module (html-to-text)

I ran yarn add html-to-text successfully. The package is in the package.json list. Now when I try to require the module as described in the manual, it says Error: Cannot find module html-to-text. The same repository is working on another laptop (Mac). I am using Windows, but I don't believe that should be the issue.

const { convert } = require('html-to-text');

Any ideas?

Edit

It looks like it is with other new modules too! Running yarn adds it to node_modules, but it says Module not found on import

like image 301
Z0q Avatar asked Jul 09 '26 10:07

Z0q


1 Answers

I needed to run yarn docker --build and it worked.

like image 137
Z0q Avatar answered Jul 12 '26 00:07

Z0q



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!