=Build Failed Error: NodejsNpmBuilder:
When i run sam build getting this error:
NpmPack - NPM Failed: npm ERR! code ERR_OUT_OF_RANGE npm ERR! The value of "length" is out of range. It must be >= 0 && <= 2147483647. Received 2955307729
I tried building it without sam and started it using nodejs, it's working fine.
Template File :
AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Template to deploy Lambda for extraction
Resources:
ExtractionFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.extractionHandler
Runtime: nodejs16.x
Environment:
Variables:
S3_KEY: S3_KEY
S3_SECRET: S3_SECRET
BUCKET_NAME: BUCKET_NAME
MY_NAME: MY_NAME
index file :
const { extractionHandler } = require('./src/app');
module.exports = { extractionHandler };
node -v : v16.20.2 npm -v : 8.19.4
Hey @sumitjhajharia, can you provide an example of the folder structure of your application?
@mildaniel if i downgrade runtime from node16.x to node14.x , then it's working fine
folder structure - just an index.js file at same level and which exports extractionHandler function to console.log events