You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/nodejsWorker.ts
+8-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
varlogPrefix="LanguageWorkerConsoleLog";
2
2
varerrorPrefix=logPrefix+"[error] ";
3
-
varsupportedVersions:string[]=["v8","v10"];
3
+
varwarnPrefix=logPrefix+"[warn] ";
4
+
varsupportedVersions:string[]=["v8","v10","v12"];
4
5
varworker;
5
6
6
7
// Try validating node version
@@ -21,6 +22,12 @@ function validateNodeVersion(version) {
21
22
", but the runtime requires an LTS-covered major version. LTS-covered versions have an even major version number (8.x, 10.x, etc.) as per https://github.com/nodejs/Release#release-plan. "
22
23
+"For deployed code, change WEBSITE_NODE_DEFAULT_VERSION to '~10' in App Settings. Locally, install or switch to a supported node version (make sure to quit and restart your code editor to pick up the changes).";
23
24
}
25
+
// Log a warning that v12 is not fully supported
26
+
if(major==="v12")
27
+
{
28
+
console.warn(warnPrefix+"The Node.js version you are using ("+version+") is not fully supported by Azure Functions V2. We recommend using one the following major versions: 8, 10.");
29
+
}
30
+
24
31
// Unknown error
25
32
}catch(err){
26
33
varunknownError="Error in validating Node.js version. ";
0 commit comments