LoginSignup
1
0

More than 1 year has passed since last update.

AzureFunctionsをnode14でローカルで動かそうとするとエラーがでて動かない

Last updated at Posted at 2021-04-22

はじめに

なかなか検索に引っかかってこないので他で困っている人のためにメモしておく。

これまでnode12でFunctionsを動かしてきたのですが、Functionsv3の推奨がnode14ですので意気揚々とはじめました。
https://docs.microsoft.com/ja-jp/azure/azure-functions/functions-reference-node?tabs=v2#node-version

functions core tools v3でfunc startしたところ以下のエラー

LanguageWorkerConsoleLog[error] Incompatible Node.js version (v14.16.1). Refer to our documentation to see the Node.js versions supported by each version of Azure Functions: https://aka.ms/functions-node-versions

色々と試したのですが、時間がないので結論だけ。

結論

Azure Functions Core Toolsのバージョン

$ func -v
3.0.2881

functions core toolsを最新に

sudo apt-get update
sudo apt-get install azure-functions-core-tools-3

私の場合はWSLだったのでこんな手順ですが他のプラットフォームの場合の手順はこちら
https://github.com/Azure/azure-functions-core-tools

更新後のバージョン

$ func -v
3.0.3442

うごいた

$ func start

Azure Functions Core Tools
Core Tools Version:       3.0.3442 Commit hash: 6bfab24b2743f8421475d996402c398d2fe4a9e0  (64-bit)
Function Runtime Version: 3.0.15417.0


Functions:

        hello: [GET,POST] http://localhost:7071/api/hello

・・・

マイナーバージョンでも結構動き変わるから油断するなよ。という記事でした。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0