> For the complete documentation index, see [llms.txt](https://dinoin.gitbook.io/nodejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dinoin.gitbook.io/nodejs/zai-azure-de-function-zhong/azure.function-zhong-de-package-yin-yong.md).

# azure.function中的package引用

因為需要部署雲端，依存關係無法手動處理（無伺服器特性沒可能去執行npm安裝...）

需於設定檔寫依賴\
下面範例引用「streamifier（v0.1.1）」

{% code title="index.js" %}

```
const streamifier = require('streamifier');
```

{% endcode %}

{% code title="package.json" %}

```
{
  "name": "FunctionName",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "start": "func start",
    "test": "echo \"No tests yet...\""
  },
  "author": "Dinoin",
  "dependencies": {
    "streamifier": "^0.1.1"
  },
  "devDependencies": {}
}
```

{% endcode %}

package.json在function專案資料夾中，理論上是專案中所有function共用。

{% hint style="danger" %}
推測可能於每一次無服務啟動時進行下載，說不定對啟動效能有影響，需要再觀察。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dinoin.gitbook.io/nodejs/zai-azure-de-function-zhong/azure.function-zhong-de-package-yin-yong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
