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
* updates to make 2.0 worker 1.0 compatible
* split validation logic so it's both v1 and v2 compatible
* hard-coded solution to camelCase timer trigger while proper fix is out of scope for timeline
* added test
* adding unit test
* testing both v1 behavior and v2 behavior
* dont code without intellisense
* remove e2e test until have better test on functions host v2 and v3
* re-add node 8 unit tests
systemWarn("The Node.js version you are using ("+version+") is not fully supported with Azure Functions V2. We recommend using one the following major versions: 8, 10.");
105
+
}
106
+
}else{
107
+
if(version.startsWith("v8."))
108
+
{
109
+
letmsg="Incompatible Node.js version. The version you are using ("+version+") is not supported with Azure Functions V3. Please use one of the following major versions: 10, 12.";
110
+
systemError(msg);
111
+
throwmsg;
112
+
}
113
+
}
114
+
98
115
constworkerCapabilities={
99
116
RpcHttpTriggerMetadataRemoved: "true",
100
117
RpcHttpBodyOnly: "true"
101
118
};
119
+
102
120
this._eventStream.write({
103
121
requestId: requestId,
104
122
workerInitResponse: {
@@ -146,7 +164,7 @@ export class WorkerChannel implements IWorkerChannel {
Copy file name to clipboardExpand all lines: src/nodejsWorker.ts
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
varlogPrefix="LanguageWorkerConsoleLog";
2
2
varerrorPrefix=logPrefix+"[error] ";
3
3
varwarnPrefix=logPrefix+"[warn] ";
4
-
varsupportedVersions:string[]=["v10","v12"];
4
+
varsupportedVersions:string[]=["v8","v10","v12"];
5
5
varworker;
6
6
7
7
// Try validating node version
@@ -17,12 +17,12 @@ function validateNodeVersion(version) {
17
17
message="Could not parse Node.js version: '"+version+"'";
18
18
// Unsupported version note: Documentation about Node's stable versions here: https://github.com/nodejs/Release#release-plan and an explanation here: https://medium.com/swlh/understanding-how-node-releases-work-in-2018-6fd356816db4
19
19
}elseif(supportedVersions.indexOf(major)<0){
20
-
message="Incompatible Node.js version. The version you are using is "
21
-
+version+
22
-
", but the runtime requires an LTS-covered major version. LTS-covered versions have an even major version number (10.x, 12.x, etc.) as per https://github.com/nodejs/Release#release-plan. "
23
-
+"For deployed code, change WEBSITE_NODE_DEFAULT_VERSION to '~12' 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).";
20
+
message="Incompatible Node.js version. The version you are using ("
21
+
+version
22
+
+") is not supported with Azure Functions. Please use one of the following major versions: 10, 12."
23
+
+"For deployed code on Windows, change WEBSITE_NODE_DEFAULT_VERSION to '~12' in App Settings."
24
+
+"Locally, install or switch to a supported node version (make sure to quit and restart your code editor to pick up the changes).";
24
25
}
25
-
26
26
// Unknown error
27
27
}catch(err){
28
28
varunknownError="Error in validating Node.js version. ";
0 commit comments