エラーコードポータル
Node.jsNode.jsエラーコード

ERR_BUFFER_CONTEXT_NOT_AVAILABLE

buffer context not available

コード ERR_BUFFER_CONTEXT_NOT_AVAILABLE · Node.jsが報告した問題です。

Node.js インスタンスに関連付けられていない JS エンジン コンテキスト内で、アドオンまたは埋め込みコードから Node.js バッファ インスタンスを作成しようとしました。 Buffer メソッドに渡されたデータは、メソッドが戻るまでに解放されています。 このエラーが発生した場合、Buffer インスタンスを作成する代わりに、結果として得られるオブジェクトのプロトタイプが異なるだけの通常の Uint8Array を作成することが考えられます。 Uint8Array は通常、バッファーが存在するすべての Node.js コア API で受け入れられます。これらはすべてのコンテキストで使用できます。

Google Translate · 自動翻訳です。専門用語や適用条件は英語の原文で確認してください。

An attempt was made to create a Node.js Buffer instance from addon or embedder code, while in a JS engine Context that is not associated with a Node.js instance. The data passed to the Buffer method will have been released by the time the method returns. When encountering this error, a possible alternative to creating a Buffer instance is to create a normal Uint8Array, which only differs in the prototype of the resulting object. Uint8Arrays are generally accepted in all Node.js core APIs where Buffers are; they are available in all Contexts.

トラブルシューティング・診断リンク

まず、文書の製品・バージョン・発生環境が現在の状況と一致しているか確認してください。