Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] - Types of property signRequest are incompatible (outdated ms-rest-js 1.0 reference) #4793

Closed
2 tasks done
ak99372 opened this issue Aug 19, 2019 · 2 comments
Closed
2 tasks done
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault

Comments

@ak99372
Copy link

ak99372 commented Aug 19, 2019

  • Package Name: @azure/keyvault
  • Package Version: 0.1.0
  • Operating system:
  • nodejs
    • version: 10.15.1
  • typescript
    • version: 3.4

Describe the bug
KeyVault package is referencing outdated ms-auzre-js package version 1.0 (ServiceClientCredentials) and fails to compile when used with ms-rest-nodeauth reference with following error:

Argument of type 'import("/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials").ServiceClientCredentials' is not assignable to parameter of type 'import("/node_modules/@azure/keyvault/node_modules/@azure/ms-rest-js/es/lib/credentials/serviceClientCredentials").ServiceClientCredentials'.
  Types of property 'signRequest' are incompatible.
    Type '(webResource: import("/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource) => Promise<import("/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource>' is not assignable to type '(webResource: import("/node_modules/@azure/keyvault/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource) => Promise<...>'.
      Types of parameters 'webResource' and 'webResource' are incompatible.
        Type 'import("/node_modules/@azure/keyvault/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource' is not assignable to type 'import("/node_modules/@azure/ms-rest-js/es/lib/webResource").WebResource'.
          Types of property 'headers' are incompatible.
            Type 'import("/node_modules/@azure/keyvault/node_modules/@azure/ms-rest-js/es/lib/httpHeaders").HttpHeaders' is not assignable to type 'import("/node_modules/@azure/ms-rest-js/es/lib/httpHeaders").HttpHeaders'.
              Types have separate declarations of a private property '_headersMap'.

To Reproduce
Steps to reproduce the behavior:

import { ServiceClientCredentials } from '@azure/ms-rest-js';
import * as azureAuth from '@azure/ms-rest-nodeauth';
import * as KeyVault from '@azure/keyvault';

const credentials = await azureAuth.loginWithVmMSI();
const keyVaultClient = new KeyVault.KeyVaultClient(credentials);

Expected behavior
Package to be compatible with latest @azure/ms-rest-js and @azure/ms-rest-nodeauth

@ak99372 ak99372 changed the title [KeyVault] - Types of property signRequest are incompatible (outdated no-rest-js 1.0 reference) [KeyVault] - Types of property signRequest are incompatible (outdated ms-rest-js 1.0 reference) Aug 19, 2019
@loarabia loarabia added customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team. labels Aug 19, 2019
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. and removed Mgmt This issue is related to a management-plane library. Service Attention Workflow: This issue is responsible by Azure service team. labels Nov 11, 2019
@sophiajt sophiajt added this to the [2019] December milestone Nov 12, 2019
@daviwil
Copy link
Contributor

daviwil commented Nov 13, 2019

Hi @ak99372, it is intentional that @azure/keyvault does not support ms-rest-js 2.0; many of our libraries don't currently support it because we have been moving over to a new stack that is based on @azure/core-http.

@azure/keyvault is now deprecated in favor of @azure/keyvault-keys and @azure/keyvault-secrets. Could you try one of those libraries to verify that it works for you in the scenarios that you care about?

Thanks!

@daviwil daviwil closed this as completed Nov 13, 2019
@ghost
Copy link

ghost commented Nov 13, 2019

Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault
Projects
None yet
Development

No branches or pull requests

5 participants