Unable to authenticate to Nexus OSS 2 registry

Hi everyone,
I’m facing this error: "Unable to authenticate, need: BASIC realm=“Sonatype Nexus Repository Manager”.

  • Nexus version: 2.15.0
  • npm: 8.19.2
    My user has all necessary rights I need to publish my package on the Nexus server.
    I googled and read almost all posts about this error on StackOverFlow and they usually say I need to enable the Bearer Token on Nexus, but I don’t have this option on Nexus 2. It exist only on Nexus 3.
    I’ve set the .npmrc with the right conf, user, registry, always-auth and _auth.
    Have you faced this issue? Any ideas? Thank you so much for your help in advance.

Kind regards,
Fatima