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
> 2024-02-21T08:21:47.729Z d74793a1-1596-4182-9ce5-6eb0370f8941 ERROR Invoke Error
> {
> "errorType": "TypeError",
> "errorMessage": "req.on is not a function",
> "stack": [
> "TypeError: req.on is not a function",
> " at formidable.IncomingForm.parse (/var/task/node_modules/formidable-serverless/lib/index.js:39:7)",
> " at response.statusCode (/var/task/index.js:89:12)",
> " at new Promise (<anonymous>)",
> " at exports.handler (/var/task/index.js:88:12)"
> ]
> }
I have a really plain lambda so I’m not sure what I’m missing.
My AWS lambda config:
Compatible architectures - Both:
• x86_64
• arm64
Compatible runtimes:
• nodejs 20.x
console.log('Node version is: ' + process.version);
console.log(process.versions);
I have an easily reproducible setup:
• Windows 10 with VS Code.
• Just installed node 20.11.1 LTS from nodejs.org using the big button which downloads:
node-v20.11.1-x64.msi
• In my VS Code terminal: npm install npm@latest -g
• So now npm -v
Shows version: 10.4.0 node -v
Shows version: v20.11.1
Created my folder "c:\git\lmbd-202-api" and added in my "index.js" as shown above.
In VS Code: File, Open [that] folder.
In VS Code: Terminal, New terminal and type: npm init -y
Then type: npm install formidable-serverless
The output was: npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
Is there a npm command to just upgrade the parts of formidable that are needed (like your install only pulls 43k) or do I have to pull the entire 400k? Note, I still received the same error after downloading all of it. npm install formidable@v3
Selected all the files in my "lmbd-202-api" folder, right mouse click: Send to: Compressed zip folder, and name it "lmbd-202-api.zip."
In the AWS Lambda console, on the “Code source” page, click Upload from, .zip file. Select the lmbd-202-api.zip. Note "lmbd-202-api" is also the exact name of my Lambda function.
In the AWS Lambda console, add a space after any semicolon so the Deploy button becomes active; Then click it.
Hitting the end point with a Postman PUT with multipart Form-Data that contains a 1k json file and two 50k images throws the 500 level error.
Note, my CloudFront origin is passing the request to my API Gateway which has Lambda Proxy Integration on and is in turn passing the request to my Lambda. Note, I logged the entire event to CloudWatch and the last line in the event is: isBase64Encoded: false.
Thank you
The text was updated successfully, but these errors were encountered:
Hi, @Amit-A ,
AWS lambda is throwing:
I have a really plain lambda so I’m not sure what I’m missing.
My AWS lambda config:
Compatible architectures - Both:
• x86_64
• arm64
Compatible runtimes:
• nodejs 20.x
Shows in CloudWatch:
Here is my index.js:
I have an easily reproducible setup:
• Windows 10 with VS Code.
• Just installed node 20.11.1 LTS from nodejs.org using the big button which downloads:
node-v20.11.1-x64.msi
• In my VS Code terminal:
npm install npm@latest -g
• So now
npm -v
Shows version: 10.4.0
node -v
Shows version: v20.11.1
npm init -y
npm install formidable-serverless
The output was:
npm WARN deprecated [email protected]: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau
Is there a npm command to just upgrade the parts of formidable that are needed (like your install only pulls 43k) or do I have to pull the entire 400k? Note, I still received the same error after downloading all of it.
npm install formidable@v3
Note, my CloudFront origin is passing the request to my API Gateway which has Lambda Proxy Integration on and is in turn passing the request to my Lambda. Note, I logged the entire event to CloudWatch and the last line in the event is: isBase64Encoded: false.
Thank you
The text was updated successfully, but these errors were encountered: