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

DocumentIntelligenceClient is not a function

未關閉
#31 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
201
分支
115
PR 合併指標
30 天內沒有已合併 PR

描述

**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.

貢獻指南

開啟貢獻指南

研究方向

從連結的 v4.0 JavaScript quickstart 開始,將其對 DocumentIntelligenceClient 的使用方式與 legacy 3.1 範例進行比較。在 Node 16.13.0 上重現該範例,然後更新文件,使預建模型範例能夠在沒有 TypeError 的情況下成功執行。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
azure, javascript, node.js
領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。