Home > Back-end >  How to Push NPM Package to Azure Artifact Feed?
How to Push NPM Package to Azure Artifact Feed?

Time:02-10

By mistake, I have deleted an NPM Package from Azure Artifact Feed and then deleted it from Recyclebin also. Now while trying to push the NPM package back to Azure Artifact Feed, I am getting the below error message. How do I push the same package again to Artifact Feed?

> npm --registry https://pkgs.dev.azure.com/maryodavid0305/Platform/_packaging/test/npm/registry/ publish jdmessenger-1.0.0.tgz
npm notice
npm notice package: @jd-libs/[email protected]
npm notice === Tarball Contents ===
npm notice 2.1kB dist/cjs/events.js
npm notice 938B  dist/esm/events.js
npm notice 5.2kB dist/cjs/executor.js
npm notice 4.0kB dist/esm/executor.js
npm notice 712B  dist/cjs/index.js
npm notice 87B   dist/esm/index.js
npm notice 1.9kB package.json
npm notice 1.0kB dist/cjs/events.js.map
npm notice 975B  dist/esm/events.js.map
npm notice 3.4kB dist/cjs/executor.js.map
npm notice 3.4kB dist/esm/executor.js.map
npm notice 141B  dist/cjs/index.js.map
npm notice 145B  dist/esm/index.js.map
npm notice 602B  README.md
npm notice 1.0kB dist/cjs/events.d.ts
npm notice 1.0kB dist/esm/events.d.ts
npm notice 1.9kB src/tests/events.spec.ts
npm notice 1.7kB src/events.ts
npm notice 1.3kB dist/cjs/executor.d.ts
npm notice 1.3kB dist/esm/executor.d.ts
npm notice 5.2kB src/tests/executor.spec.ts
npm notice 5.8kB src/executor.ts
npm notice 54B   dist/cjs/index.d.ts
npm notice 54B   dist/esm/index.d.ts
npm notice 54B   src/index.ts
npm notice === Tarball Details ===
npm notice name:          @jd-libs/jdmessenger
npm notice version:       1.0.0
npm notice package size:  8.8 kB
npm notice unpacked size: 44.1 kB
npm notice shasum:        294b8c616c6a846d1b5ef72fca3df4412c1830d4
npm notice integrity:     sha512-3Q3rsjeOMUms7[...]NVf6QC56tHDyw==
npm notice total files:   25
npm notice
npm ERR! code E403
npm ERR! 403 403 Forbidden - The version 1.0.0 of @jd-libs/jdmessenger has been deleted. It cannot be restored or pushed. (DevOps Activity ID: 54385895-A886-4BB4-A948-AF65CEE0F8A7) - PUT https://pkgs.dev.azure.com/maryodavid0305/Platform/_packaging/test/npm/registry/@jd-libs/jdmessenger - The version 1.0.0 of @jd-libs/jdmessenger has been deleted. It cannot be restored or pushed.
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.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\maryo\AppData\Roaming\npm-cache\_logs\2022-02-09T09_50_24_857Z-debug.log

CodePudding user response:

The only way to do this, as I know, is pushing another version.

If possible, upgrade version number, i.e. 1.0.1, and push it.

  • Related