Installation error Ghost storage adapter S3

Hello everyone, I need help with the installation of ghost-storage-adapter-s3, it gives the following error.
ghost-mgr@ghostsite:/var/www/ghost/current$ npm install ghost-storage-adapter-s3

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: bookshelf@1.2.0
npm error Found: knex@2.4.2
npm error node_modules/knex
npm error   knex@"2.4.2" from knex-migrator@5.2.1
npm error   node_modules/knex-migrator
npm error     knex-migrator@"5.2.1" from the root project
npm error   knex@"2.4.2" from the root project
npm error   1 more (mock-knex)
npm error
npm error Could not resolve dependency:
npm error peer knex@">=0.15.0 <0.22.0" from bookshelf@1.2.0
npm error node_modules/bookshelf
npm error   peer bookshelf@">=1.1.0" from bookshelf-relations@2.7.0
npm error   node_modules/bookshelf-relations
npm error     bookshelf-relations@"2.7.0" from the root project
npm error   bookshelf@"1.2.0" from the root project
npm error
npm error Conflicting peer dependency: knex@0.21.21
npm error node_modules/knex
npm error   peer knex@">=0.15.0 <0.22.0" from bookshelf@1.2.0
npm error   node_modules/bookshelf
npm error     peer bookshelf@">=1.1.0" from bookshelf-relations@2.7.0
npm error     node_modules/bookshelf-relations
npm error       bookshelf-relations@"2.7.0" from the root project
npm error     bookshelf@"1.2.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/ghost-mgr/.npm/_logs/2024-10-16T09_51_43_684Z-eresolve-report.txt

npm error A complete log of this run can be found in: /home/ghost-mgr/.npm/_logs/2024-10-16T09_51_43_684Z-debug-0.log
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.

So… did you try that?

I switched to the user sudo -i -u ghost-mgr and ran the command ghost-mgr@ghostsite:/var/www/ghost$ npm install ghost-storage-adapter-s3 --legacy-peer-deps

npm warn deprecated querystring@0.2.0: The query string API is considered deprecated. New code should use the URLSearchParams API.

40 packages added in 6 months

16 packages are looking for funding
  run `npm fund` for more information