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

Cannot find module 'dataverse-ify/lib/xrm-webapi/TokenCache' #43

Open
korakanchan opened this issue Apr 21, 2023 · 2 comments
Open

Cannot find module 'dataverse-ify/lib/xrm-webapi/TokenCache' #43

korakanchan opened this issue Apr 21, 2023 · 2 comments

Comments

@korakanchan
Copy link

Token Aquisition Completed

C:\Projects\Typescript-Webresources\clientjs>npx dataverse-gen init
Cannot find module 'dataverse-ify/lib/xrm-webapi/TokenCache'
Require stack:

  • C:\Users\xxxx\AppData\Roaming\npm-cache_npx\16972\node_modules\dataverse-gen\lib\index.js

Getting above error

@ckl-bso
Copy link

ckl-bso commented May 5, 2023

@korakanchan this fixed it for me scottdurow/dataverse-gen#28 (comment)

@jcirujales
Copy link

jcirujales commented Feb 28, 2024

I still get this as well, and when I follow the "fix" then reference the Contact (IEntity) object from doing a .retrieve, I get the following error (see below):

const serviceClient = new XrmContextDataverseClient(Xrm.WebApi);
    try {
      const contact = await serviceClient.retrieve<Contact>("contact", contactId, true);

Metadata not found for contact. Please create the early bound types.

Update: Upgrading to version 2 did fix the issue, to fix the "Metadata not found" error, I added the following line:
setMetadataCache(metadataCache) before declaring serviceClient,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants