I have this package.json and I want to download the dependency xyz/typescript-sdk from a azure feed that don't have access to public registry like npmjs and the others dependencies downloads from the public registry
{
"name": "@xyz/typescript-sdk",
"description": "",
"version": "0.0.1",
"keywords": [
"xyz",
"typescript",
"sdk"
],
"main": "build/xyz-sdk.bundle.js",
"types": "build/src/main.d.ts",
"files": [
"build/**/*"
],
"repository": {
"type": "git",
"url": ""
},
"dependencies": {
"@angular/animations": "~12.2.0",
"@xyz/typescript-sdk": "file:xyz-typescript-sdk-0.0.1.tgz"
},
"devDependencies": {
"@angular-builders/jest": "latest",
"@angular-devkit/build-angular": "~12.2.5"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
The Azure instructions indicate to connect to npm feed I have to create a .npmrc file in the user's home and in the same directory as the package.json. I have tried creating the .npmrc file in my home and putting this syntax in the dependencies for @xyz/typescript-sdk:
"dependencies": {
"@xyz/typescript-sdk": "git+ssh://git@pkgs.dev.azure.com/ORGANIZATION/PROJECT/_packaging/FEED/npm/registry/
}
But I get this error:
npm WARN tar TAR_BAD_ARCHIVE: Unrecognized archive format
npm ERR! code TAR_BAD_ARCHIVE
npm ERR! TAR_BAD_ARCHIVE: Unrecognized archive
Or in any case, is there a way to configure different registries through the .npmrc file?. In the azure instructions, they say to create a .npmrc file with the following
registry=https://pkgs.dev.azure.com/ORGANIZATION/PROJECT/_packaging/FEED/npm/registry/
always-auth=true
Is there a way to add other registries in the npmrc file like the npmjs?