Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during sls deploy #6659

Closed
ejlegarda opened this issue Sep 10, 2019 · 14 comments

Comments

@ejlegarda
Copy link

commented Sep 10, 2019

This is a Bug Report

Description

  • What went wrong? error when running sls deploy
  • What did you expect should have happened? I expect to deploy my code to AWS Lambda with no errores
  • What was the config you used?
  • What stacktrace or error message from your provider did you see?

Similar or dependent issues:

  • #12345

Additional Data

  • Serverless Framework Version you're using: 1.51.0
  • Operating System: win32
  • Stack Trace:
  • Provider Error messages:

D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets>set SLS_DEBUG=*

D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets>sls deploy --verbose
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command create_domain
Serverless: Load command delete_domain
Serverless: Load command webpack
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: [AWS ssm 200 0.151s 0 retries] getParameter({ Name: '/development/relationalDB/host',
WithDecryption: false })
Serverless: [AWS ssm 200 0.171s 0 retries] getParameter({ Name: '/development/jwtSecretKey', WithDecryption: false })
Serverless: [AWS ssm 200 0.113s 0 retries] getParameter({ Name: '/development/relationalDB/port',
WithDecryption: false })
Serverless: [AWS ssm 200 0.115s 0 retries] getParameter({ Name: '/development/relationalDB/type',
WithDecryption: false })
Serverless: [AWS ssm 200 0.106s 0 retries] getParameter({ Name: '/development/relationalDB/username',
WithDecryption: false })
Serverless: [AWS ssm 200 0.127s 0 retries] getParameter({ Name: '/development/relationalDB/password',
WithDecryption: false })
Serverless: [AWS ssm 200 0.118s 0 retries] getParameter({ Name: '/development/relationalDB/database',
WithDecryption: false })
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Invoke webpack:validate
Serverless: Removing D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets.webpack
Serverless: Invoke webpack:compile
Serverless: Bundling with Webpack...
ts-loader: Using typescript@2.9.2 and D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\tsconfig.json
Time: 7515ms
Asset Size Chunks Chunk Names
src/lambdas.js 8.08 MB 0 [emitted] [big] src/lambdas
[4] ./src/controllers/timeSheets/timeSheets_lambdas.ts 26.9 kB {0} [built]
[82] ./src/common/Utils.ts 17.7 kB {0} [built]
[110] ./src/common/errors.ts 2.71 kB {0} [built]
[195] ./src/common/Auth.ts 2.69 kB {0} [built]
[287] ./src/entities.ts 648 bytes {0} [built]
[304] ./src/lambdas.ts 3.59 kB {0} [built]
[305] ./node_modules/aws-sdk/lib/aws.js 159 bytes {0} [built]
[913] ./node_modules/jsonwebtoken/index.js 276 bytes {0} [built]
[928] ./src/controllers/timeSheets/timeSheets.ts 98 kB {0} [built]
[929] ./src/common/ConnPool.ts 7.48 kB {0} [built]
[1420] ./src/common/ListUtils.ts 651 bytes {0} [built]
[1421] ./src/common/DBOptions.ts 518 bytes {0} [built]
[1425] ./src/controllers/timeSheets/addSchema.ts 2.42 kB {0} [built]
[1426] ./src/common/models.ts 4.37 kB {0} [built]
[1427] ./node_modules/class-validator/index.js 2.98 kB {0} [built]
+ 1473 hidden modules

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
126:27-40 Critical dependency: the request of a dependency is an expression
@ ./node_modules/typeorm/platform/PlatformTools.js
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
131:23-85 Critical dependency: the request of a dependency is an expression
@ ./node_modules/typeorm/platform/PlatformTools.js
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'mongodb' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 76:27-45
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'mysql' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 81:27-43
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'mysql2' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 83:27-44
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'oracledb' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 88:27-46
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'pg' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 93:27-40
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'pg-native' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 95:27-47
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'pg-query-stream' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 97:27-53
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'redis' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 102:27-43
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts

WARNING in ./node_modules/typeorm/platform/PlatformTools.js
Module not found: Error: Can't resolve 'sqlite3' in 'D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets\node_modules\typeorm\platform'
@ ./node_modules/typeorm/platform/PlatformTools.js 107:27-45
@ ./node_modules/typeorm/driver/mongodb/typings.js
@ ./node_modules/typeorm/index.js
@ ./src/common/ConnPool.ts
@ ./src/controllers/timeSheets/timeSheets.ts
@ ./src/controllers/timeSheets/timeSheets_lambdas.ts
@ ./src/lambdas.ts
Serverless: Invoke webpack:package
Serverless: Zip service: D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets.webpack\service [138 ms]
Serverless: Packaging service...
Serverless: Remove D:\Mobile Apps\ACT-Nurse-Portal\API\ACTNextGen-Services\timeSheets.webpack
Serverless: Invoke aws📦finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: [AWS apigateway 200 0.175s 0 retries] getDomainName({ domainName: 'api.acthomehealthservices.us' })
Serverless: [AWS route53 200 0.157s 0 retries] listHostedZones({})
Serverless: [AWS route53 400 0.151s 0 retries] changeResourceRecordSets({ ChangeBatch:
{ Changes:
[ { Action: 'DELETE',
ResourceRecordSet:
{ Name: 'api.acthomehealthservices.us',
ResourceRecords: [ { Value: 'd5h0ujtabtxju.cloudfront.net' }, [length]: 1 ],
TTL: 60,
Type: 'CNAME' } },
{ Action: 'CREATE',
ResourceRecordSet:
{ Name: 'api.acthomehealthservices.us',
Type: 'A',
AliasTarget:
{ DNSName: 'd5h0ujtabtxju.cloudfront.net',
EvaluateTargetHealth: false,
HostedZoneId: 'Z2FDTNDATAQYW2' } } },
[length]: 2 ],
Comment: 'Record created by serverless-domain-manager' },
HostedZoneId: 'ZXDXUJOFI6AB5' })
Serverless: Invoke aws:deploy:deploy
Serverless: [AWS cloudformation 200 0.193s 0 retries] describeStacks({ StackName: 'timeSheets-dev' })
Serverless: [AWS cloudformation 200 0.134s 0 retries] describeStackResource({ StackName: 'timeSheets-dev',
LogicalResourceId: 'ServerlessDeploymentBucket' })
Serverless: [AWS s3 200 0.225s 0 retries] listObjectsV2({ Bucket: 'timesheets-dev-serverlessdeploymentbucket-gunkf937d0w6',
Prefix: 'serverless/timeSheets/dev' })
Serverless: [AWS s3 200 0.129s 0 retries] headObject({ Bucket: 'timesheets-dev-serverlessdeploymentbucket-gunkf937d0w6',
Key:
'serverless/timeSheets/dev/1568033940590-2019-09-09T12:59:00.590Z/compiled-cloudformation-template.json' })
Serverless: [AWS s3 200 0.145s 0 retries] headObject({ Bucket: 'timesheets-dev-serverlessdeploymentbucket-gunkf937d0w6',
Key:
'serverless/timeSheets/dev/1568033940590-2019-09-09T12:59:00.590Z/timeSheets.zip' })
Serverless: [AWS lambda 200 0.185s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-retrieveTimeSheet' })
Serverless: [AWS lambda 200 0.187s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateTimeSheet' })
Serverless: [AWS lambda 200 0.105s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-retrieveTimeSheetList' })
Serverless: [AWS lambda 200 0.108s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateTimeSheetList' })
Serverless: [AWS lambda 200 0.103s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateTimeSheetTag' })
Serverless: [AWS lambda 200 0.103s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-removeTimeSheetList' })
Serverless: [AWS lambda 200 0.107s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-retrieveDataEntryList' })
Serverless: [AWS lambda 200 0.112s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateDataEntryList' })
Serverless: [AWS lambda 200 0.1s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-ub92List' })
Serverless: [AWS lambda 200 0.115s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-removeUB92' })
Serverless: [AWS lambda 200 0.107s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-retrieveUB92' })
Serverless: [AWS lambda 200 0.106s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateUB92' })
Serverless: [AWS lambda 200 0.117s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-retrieveCMS1500' })
Serverless: [AWS lambda 200 0.105s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateCMS1500' })
Serverless: [AWS lambda 200 0.103s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-invoiceRemarksList' })
Serverless: [AWS lambda 200 0.099s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-removeinvoiceRemarks' })
Serverless: [AWS lambda 200 0.11s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateRemarks' })
Serverless: [AWS lambda 200 0.113s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateQBImport' })
Serverless: [AWS lambda 200 0.099s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-addUpdateInvoice' })
Serverless: [AWS lambda 200 0.103s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-printInvoices' })
Serverless: [AWS lambda 200 0.113s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-generateTextFiles' })
Serverless: [AWS lambda 200 0.106s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-generateTextFiles1500' })
Serverless: [AWS lambda 200 0.126s 0 retries] getFunction({ FunctionName: 'timeSheets-dev-createInvoice' })

Type Error ---------------------------------------------

TypeError: Cannot convert undefined or null to object
at hasOwnProperty ()
at features.constructor.validateRegionalEndpointsFlag (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\services\sts.js:92:41)
at features.constructor.optInRegionalEndpoint (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\services\sts.js:106:10)
at features.constructor.validateService (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\services\sts.js:124:10)
at features.constructor.initialize (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\service.js:52:10)
at features.constructor.Service [as constructor] (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\service.js:40:10)
at features.constructor (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\util.js:624:24)
at new features.constructor (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\util.js:624:24)
at features.constructor.Service [as constructor] (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\service.js:31:17)
at new features.constructor (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\aws-sdk\lib\util.js:624:24)
at persistentRequest (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:286:28)
at doCall (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:238:11)
at BbPromise (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:260:16)
at persistentRequest (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:236:7)
at Object.request.requestQueue.add [as promiseGenerator] (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:282:7) at Queue._dequeue (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\promise-queue\lib\index.js:153:30)
at C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\promise-queue\lib\index.js:109:18
From previous event:
at Queue.add (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\promise-queue\lib\index.js:94:16)
at AwsProvider.request (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:281:39)
at AwsProvider.getAccountInfo (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\provider\awsProvider.js:508:17)
at AwsDeploy.checkLogGroupSubscriptionFilterResourceLimitExceeded (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\checkForChanges.js:184:26)
at AwsDeploy.BbPromise.bind.then.then.then.then (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\checkForChanges.js:36:21)
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
From previous event:
at AwsDeploy.checkForChanges (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\lib\checkForChanges.js:30:8)
From previous event:
at Object.aws:deploy:deploy:checkForChanges [as hook] (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:104:12)
at BbPromise.reduce (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:464:55)
From previous event:
at PluginManager.invoke (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:464:22)
at PluginManager.spawn (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:484:17)
at AwsDeploy.BbPromise.bind.then (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:93:48)
From previous event:
at Object.deploy:deploy [as hook] (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\plugins\aws\deploy\index.js:89:30)
at BbPromise.reduce (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:464:55)
From previous event:
at PluginManager.invoke (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:464:22)
at PluginManager.run (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:496:17)
at variables.populateService.then (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:116:33)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at Serverless.run (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\lib\Serverless.js:103:74)
at serverless.init.then (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:60:28)
at C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\graceful-fs\graceful-fs.js:136:16
at C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\node_modules\graceful-fs\graceful-fs.js:57:14
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
at initializeErrorReporter.then (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:60:6)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at Object. (C:\Users\ejleg\AppData\Roaming\npm\node_modules\serverless\bin\serverless.js:46:39)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: win32
Node Version: 10.16.3
Framework Version: 1.51.0
Plugin Version: 1.3.11
SDK Version: 2.1.1

@jimbocoder

This comment has been minimized.

Copy link

commented Sep 10, 2019

@ejlegarda I spent a lot of time on this problem today. It's related to the new version of aws-sdk that was released today.

If you use this in your package.json it should resolve your issue for now:

"aws-sdk": "2.524.0"

The problem appeared with version 2.525.0

Hint for sls team member picking this up: take a look at the release notes for that version, surrounding stsRegionEnabledEndpoints functionality.

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

I was affected by this issue too.

It looks like it has broken a lot of things:
aws/aws-sdk-js#2839

Trying to set a fixed aws-sdk version at package.json did not fix the issue for me.

@jimbocoder

This comment has been minimized.

Copy link

commented Sep 10, 2019

@franciscocpg sorry to ask, but did you run npm again to get the new lower version? If this fix is not universal, that's good info for us to know. Maybe even clear out your node_modules?

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

@jimbocoder
Yes, removed node_modules but I'm using yarn.

I haven't tried npm yet.

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

Now I was able to solve this issue using yarn and resolutions. Here is a package.json snippet:

{
  "devDependencies": {
    "serverless": "1.51.0"
  },
  "resolutions": {
    "serverless/aws-sdk": "2.524.0"
  }
}
@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

I also noticed that there is a fix just waiting for a patch release:
aws/aws-sdk-js#2840

andyli added a commit to giffon/giffon that referenced this issue Sep 10, 2019
satoof2 added a commit to satoof2/serverless that referenced this issue Sep 10, 2019

@pmuens pmuens added this to Product - In Definition in Serverless via automation Sep 10, 2019

@pmuens pmuens added this to the 1.52.0 milestone Sep 10, 2019

@luizfilipe

This comment has been minimized.

Copy link

commented Sep 10, 2019

Hey guys, I think a patch version was shipped...

@sudosoul

This comment has been minimized.

Copy link

commented Sep 10, 2019

Hey guys, I think a patch version was shipped...

Version number please?

@luizfilipe

This comment has been minimized.

Copy link

commented Sep 10, 2019

Hey guys, I think a patch version was shipped...

Version number please?

"2.526.0"

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

Not sure if is correctly fixed though:
aws/aws-sdk-js@1a3dbb1#commitcomment-35014886

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

I've updated #6659 (comment) to:

{
  "devDependencies": {
    "serverless": "1.51.0"
  },
  "resolutions": {
    "serverless/aws-sdk": "2.526.0"
  }
}

Removed node_modules, run yarn and it worked for me. So I think that is fixed.

@franciscocpg

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

BTW: when removing node_modules and yarn.lock and running yarn again, the aws-sdk is being resolved to 2.526.0 so the issue is fixed for me.

@ejlegarda

This comment has been minimized.

Copy link
Author

commented Sep 10, 2019

I just deleted the serverless directory and installed serverless globally and it grabbed an updated aws-sdk with the null check. I used the below command
npm install -g serverless

@medikoo

This comment has been minimized.

Copy link
Member

commented Sep 11, 2019

Closing, as it got fixed with aws-sdk v2.526.0. With today's framework release, we'll also ensure to bump to that version in package.json

@medikoo medikoo closed this Sep 11, 2019

Serverless automation moved this from Product - In Definition to Done Sep 11, 2019

@medikoo medikoo removed this from the 1.52.0 milestone Sep 11, 2019

@medikoo medikoo removed this from Done in Serverless Sep 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.