с момента обновления до последней версии (1.65.0) без сервера Я получаю сообщение об ошибке после развертывания в Localstack.
Serverless: config.options_stage: development
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: ${opt:stage, 'development'}
Serverless: config.stage: development
Serverless: Using serverless-localstack
Serverless: Reconfiguring service apigateway to use http://localhost:4567
Serverless: Reconfiguring service cloudformation to use http://localhost:4581
Serverless: Reconfiguring service cloudwatch to use http://localhost:4582
Serverless: Reconfiguring service lambda to use http://localhost:4574
Serverless: Reconfiguring service dynamodb to use http://localhost:4569
Serverless: Reconfiguring service kinesis to use http://localhost:4568
Serverless: Reconfiguring service route53 to use http://localhost:4580
Serverless: Reconfiguring service firehose to use http://localhost:4573
Serverless: Reconfiguring service stepfunctions to use http://localhost:4585
Serverless: Reconfiguring service es to use http://localhost:4578
Serverless: Reconfiguring service s3 to use http://localhost:4572
Serverless: Reconfiguring service ses to use http://localhost:4579
Serverless: Reconfiguring service sns to use http://localhost:4575
Serverless: Reconfiguring service sqs to use http://localhost:4576
Serverless: Reconfiguring service sts to use http://localhost:4592
Serverless: Reconfiguring service iam to use http://localhost:4593
Serverless: Reconfiguring service ssm to use http://localhost:4583
Serverless: Reconfiguring service rds to use http://localhost:4594
Serverless: Reconfiguring service ec2 to use http://localhost:4597
Serverless: Reconfiguring service elasticache to use http://localhost:4598
Serverless: Reconfiguring service kms to use http://localhost:4599
Serverless: Reconfiguring service secretsmanager to use http://localhost:4584
Serverless: Reconfiguring service logs to use http://localhost:4586
Serverless: Reconfiguring service cloudwatchlogs to use http://localhost:4586
Serverless: Reconfiguring service iot to use http://localhost:4589
Serverless: Reconfiguring service cognito-idp to use http://localhost:4590
Serverless: Reconfiguring service cognito-identity to use http://localhost:4591
Serverless: Reconfiguring service ecs to use http://localhost:4601
Serverless: Reconfiguring service eks to use http://localhost:4602
Serverless: Reconfiguring service xray to use http://localhost:4603
Serverless: Reconfiguring service appsync to use http://localhost:4605
Serverless: Reconfiguring service cloudfront to use http://localhost:4606
Serverless: Reconfiguring service athena to use http://localhost:4607
Serverless: Warning: Unable to find plugin named: TypeScriptPlugin
Serverless: config.options_stage: development
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: development
Serverless: config.stage: development
Serverless: config.options_stage: development
Serverless: serverless.service.custom.stage: undefined
Serverless: serverless.service.provider.stage: development
Serverless: config.stage: development
Serverless: Using deployment bucket 'shift-planner-asyncjobs'
Serverless: Compiling with Typescript...
Serverless: Using local tsconfig.json
Serverless: Typescript compiled.
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Service files not changed. Skipping deployment...
Service Information
service: shift-planner-asyncjobs
stage: development
region: eu-west-1
stack: shift-planner-asyncjobs-development
resources: 5
api keys:
None
endpoints:
None
functions:
shiftPublishedEmails: shift-planner-asyncjobs-development-shiftPublishedEmails
layers:
None
Stack Outputs
ServerlessDeploymentBucketName: shift-planner-asyncjobs
ShiftPublishedEmailsLambdaFunctionQualifiedArn: ShiftPublishedEmailsLambdaVersionFBinxqNcQ4hoU4l1I0378dVUKpD30oJdG3FSg4Xf0
Serverless: Recoverable error occurred (connect ECONNREFUSED 127.0.0.1:4567), sleeping for ~6 seconds. Try 1 of 4
Serverless: Recoverable error occurred (connect ECONNREFUSED 127.0.0.1:4567), sleeping for ~7 seconds. Try 2 of 4
Serverless: Recoverable error occurred (connect ECONNREFUSED 127.0.0.1:4567), sleeping for ~4 seconds. Try 3 of 4
Serverless: Recoverable error occurred (connect ECONNREFUSED 127.0.0.1:4567), sleeping for ~7 seconds. Try 4 of 4
Serverless Error ---------------------------------------
connect ECONNREFUSED 127.0.0.1:4567
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 12.16.1
Framework Version: 1.65.0
Plugin Version: 3.4.1
SDK Version: 2.3.0
Components Version: 2.22.3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shift-planner-asyncjobs@0.1.0 deploy-localstack: `node --max-old-space-size=4096 node_modules/serverless/bin/serverless --stage development deploy --verbose`
npm ERR! Exit status 1
вот файл без сервера:
service:
name: shift-planner-asyncjobs
plugins:
- serverless-deployment-bucket
- serverless-localstack
- serverless-plugin-typescript
- serverless-offline
provider:
name: aws
runtime: nodejs12.x
region: 'eu-west-1'
stage: ${opt:stage, 'development'}
memorySize: 512
deploymentBucket:
name: shift-planner-asyncjobs
serverSideEncryption: AES256
tracing:
apiGateway: true
lambda: true
environment:
ENV: ${self:provider.stage, 'development'}
REGION: 'eu-west-1'
custom:
localstack:
stages:
- development
debug: true
host: 'http://localhost'
functions:
publishedEmails:
handler: handler.someHandler
events:
- sqs:
arn:
Fn::Join:
- ':'
- - arn
- aws
- sqs
- Ref: AWS::Region
- Ref: AWS::AccountId
- queueName
Я сравнил логи двух версий и похоже, что в версии 1.65.0 я пропускаю эту часть здесь:
Serverless: Using custom endpoint for S3: http://localhost:4572
Serverless: Using custom endpoint for CloudFormation: http://localhost:4581
Serverless: Using custom endpoint for S3: http://localhost:4572
Serverless: Using custom endpoint for S3: http://localhost:4572
Serverless: Using custom endpoint for Lambda: http://localhost:4574
Serverless: Using custom endpoint for STS: http://localhost:4592
Serverless: Uploading CloudFormation file to S3...
Serverless: Using custom endpoint for S3: http://localhost:4572
Serverless: Uploading artifacts...
Serverless: Uploading service shift-planner-asyncjobs.zip file to S3 (7.57 MB)...
Serverless: Using custom endpoint for S3: http://localhost:4572
Serverless: Validating template...
Serverless: Skipping template validation: Unsupported in Localstack
Serverless: Creating Stack...
Serverless: Using custom endpoint for CloudFormation: http://localhost:4581
Serverless: Overriding S3 templateUrl to http://localhost:4572
Serverless: Checking Stack create progress...
Serverless: Using custom endpoint for CloudFormation: http://localhost:4581
CloudFormation - CREATE_COMPLETE - AWS::CloudFormation::Stack - shift-planner-asyncjobs-development
Serverless: Stack create finished...
Serverless: Using custom endpoint for CloudFormation: http://localhost:4581
Serverless: Using custom endpoint for CloudFormation: http://localhost:4581
после проверки кода в репозитории, я заметил, что большинство этих логов приходят из функции 'interceptRequest (service, method, params)'
лямбда-функция работает, как и ожидалось, но это сообщение об ошибке продолжает появляться после каждого развертывания. до этого я использовал без сервера 1.53.0 и все было гладко