WEBSITE_NODE_DEFAULT_VERSION アプリケーション設定がサポートされていないNode.js バージョンを指している場合、Azure Web AppsでホストされているJavaScript Services(JSS)Webサイトがページのレンダリングに失敗する可能性があります。たとえば、WEBSITE_NODE_DEFAULT_VERSION が、サポートされている14.16.0ではなく、サポートされていない14.15.1等に設定されている場合です。サポートされているランタイムのリストは、Azure の更新後に変更される可能性があります。
現在サポートされているランタイムのリストは、次の手順で確認できます:
Azure の更新後、次のメッセージが表示されます:
英語: Around xx/xx/xxx X:XX:XX PM (UTC), on Instance [Your instance], your application was recycled as the Azure scale unit was undergoing an upgrade. There are periodic updates made by Microsoft to the underlying Azure platform to improve overall reliability, performance, and security of the platform infrastructure where your application is running on. Most of these updates are performed without any impact upon your web app. To reduce the impact of such events on your application, consider deploying your application to multiple regions and use Azure Traffic Manager to distribute the load across regions. 日本語訳: ○○年○○月○○日○○時(UTC)頃、インスタンス「貴社のインスタンス」で、Azure スケール ユニットのアップグレード中にアプリケーションがリサイクルされました。アプリケーションが実行されているプラットフォーム インフラストラクチャの全体的な信頼性、パフォーマンス、およびセキュリティを向上させるために、Microsoft によって基盤となるAzure プラットフォームに対して定期的に更新が行われます。これらの更新のほとんどは、Web アプリに影響を与えることなく実行されます。このようなイベントがアプリケーションに与える影響を減らすには、アプリケーションを複数のリージョンにデプロイし、Azure Traffic Manager を使用してリージョン間で負荷を分散することを検討してください。 |
この問題が発生した場合の症状として、ページのレンダリング時に次のようなエラーが発生する可能性があります:
Value cannot be null. Parameter name: address System.ArgumentNullException at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.Http.HttpNodeInstance.InvokeExport at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExport …
または、次のようなエラーの場合もあります。
Application has thrown an uncaught exception and is terminated:SyntaxError: Unexpected token ) at Module._compile (module.js:434:25) at Object..js (module.js:464:10)
本事象を解決するには、以下の手順に従ってください:
WEBSITE_NODE_DEFAULT_VERSION=14.16.0
詳細については、Microsoft ドキュメント を参照してください。