If you are using Rails 7.0.1 with cssbundler bootstrap:
in javascript/controllers/cropper_controller.js do not use this line `import "cropperjs/dist/cropper.css"`, it will break when you run `yarn build:css` by overwriting your `app/assets/builds/application.css`
Instead: 1. Copy cropper.css from `./node_modules/cropperjs/dist/cropper.css` 2. Paste it into `app/assets/stylesheets/cropper.scss` notice the extension change to scss 3. In `app/assets/stylesheets/application.bootstrap.scss` add `@import cropper;` 4. Run `yarn build:css` and whatever javascript bundler you are using. Everything should work correctly.