Azure-Samples / Azure-Samples/document-intelligence-code-samples

DocumentIntelligenceClient is not a function

Open
#31 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
201
Forks
115
PR merge metrics
No merged PRs in 30d

Description

**Edit 5/24/2024 5:50 PM**
I have tried running the example from the legacy 3.1 documents and do not run into this issue. It seems this is only an issue with the v4.0 documentation.

Output is
`Pages:
- Page 1 (unit: inch)
8.5x11, angle: 0
67 lines, 413 words
Tables:
- Extracted table: 3 columns, 5 rows (15 cells)
- Extracted table: 2 columns, 2 rows (4 cells)`

**Original**
I have tried running the example from the v 4.0 documentation and received this error.
I am running Node 16.13.0 on Windows 10.

I'm not sure what I am doing wrong or if the example has faulty code. Any guidance or resolution would be helpful. Thank you.

> Please provide us with the following information:
> ---------------------------------------------------------------

### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>
Copy and run the prebuilt model example from the [javascript documentation](https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/quickstarts/get-started-sdks-rest-api?view=doc-intel-4.0.0&preserve-view=true&pivots=programming-language-javascript)

### Any log messages given by the failure
>An error occurred: TypeError: DocumentIntelligenceClient is not a function

### Expected/desired behavior
> Successfully analyze the sample document

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10

### Versions
>

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.