# Publish npm artifact tar package on nexus

**URL:** <https://community.sonatype.com/t/publish-npm-artifact-tar-package-on-nexus/11352>\
**Category:** Best Practices\
**Tags:** help, integrations, nexus-repository\
**Created:** [September 23, 2023, 2:06pm UTC](https://community.sonatype.com/t/publish-npm-artifact-tar-package-on-nexus/11352 "2023-09-23T14:06:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonali.shah2](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sonali.shah2](https://community.sonatype.com/u/sonali.shah2)\
**Post date:** [September 23, 2023, 2:06pm UTC](https://community.sonatype.com/t/publish-npm-artifact-tar-package-on-nexus/11352/1 "2023-09-23T14:06:41Z")

</div>

Hi Team,  
I want to publish npm package on nexus 3. For which I have already created repositories. I am able to create user and roles and also added realm.

But still I am struggling with exact permission or role to grant user to publish the artifact on nexus.

```auto
npm publish

```

**Error :**  
npm notice Publishing to [https://xxxxxx/xxxxx-dev-repo](https://xxxxxx/xxxxx-dev-repo)  
npm ERR! code E403  
npm ERR! 403 403 Forbidden - PUT [https://xxxxxx/repository/npm-xxxx-dev-repo/@test/test-app](https://xxxxxx/repository/npm-xxxx-dev-repo/@test/test-app)  
npm ERR! 403 In most cases, you or one of your dependencies are requesting  
npm ERR! 403 a package version that is forbidden by your security policy, or  
npm ERR! 403 on a server you do not have access to.

Tag creation is successful, but while associating the tag it throw below error

```auto
 associateTag( 
                            nexusInstanceId: 'n3dev', 
                            tagName: n3tag,
                            search: [
                                        [key: 'Component Name', value: n3tag], 
                                        [key: 'Component Group	', value: '@test'], 
                                        [key: ' Component Version', value:version]
                                    ]        
                        )

```

**Error**  
Failing build due to: No components found  
[Pipeline] echo  
Exception: java.io.IOException: com.sonatype.nexus.api.exception.RepositoryManagerException: Associate tag was unsuccessful (404 response from server)

In case anyone has any idea on above mentioned both error please help…!!  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mpiggott](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mpiggott](https://community.sonatype.com/u/mpiggott)\
**Post date:** [September 25, 2023, 3:21pm UTC](https://community.sonatype.com/t/publish-npm-artifact-tar-package-on-nexus/11352/2 "2023-09-25T15:21:26Z")

</div>

It would be the _view_ _add_ privilege for the repository. Probably you should grant read, edit, add

---

<div class="post-metadata">

**Author:** ![sonali.shah2](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sonali.shah2](https://community.sonatype.com/u/sonali.shah2)\
**Post date:** [September 25, 2023, 6:25pm UTC](https://community.sonatype.com/t/publish-npm-artifact-tar-package-on-nexus/11352/3 "2023-09-25T18:25:59Z")

</div>

Already granted that permission but still, getting the same no component found error while associating tag to artifact
