sst开始“TypeError:getAwsCredentials不是函数”

问题描述 投票:0回答:2

我删除了

/node_modules
/package-lock.json
并做了
npm install

此后,当我做

npx sst start
时,我收到此错误:
TypeError: getAwsCredentials is not a function.
怎么解决这个问题?

node.js amazon-web-services amazon-s3 amazon-sqs serverless-stack
2个回答
4
投票

包.json

旧:

“@serverless-stack/cli”:“0.69.2”,

“@serverless-stack/resources”:“0.69.2”,

新:

“@serverless-stack/cli”:“0.69.6”,
“@serverless-stack/resources”:“0.69.6”,


0
投票

我将

@serverless-stack/static-site-env
0.63.0
更新到最新,
1.18.4
截至我发布此答案并解决问题时,
npm install @serverless-stack/static-site-env@latest
。就我而言,错误是:

Error: statement.freeze is not a function

Trace: TypeError: statement.freeze is not a function
    at PolicyDocument.freezeStatements (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/aws-iam/lib/policy-document.js:1:4964)
    at PolicyDocument._splitDocument (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/aws-iam/lib/policy-document.js:1:3223)
    at Role.splitLargePolicy (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/aws-iam/lib/role.js:1:12079)
    at Object.visit (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/aws-iam/lib/role.js:1:7745)
    at recurse (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:2282)
    at recurse (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:2646)
    at recurse (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:2646)
    at recurse (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:2646)
    at recurse (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:2646)
    at invokeAspects (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:2:1906)
    at synthesize (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/private/synthesis.js:1:1450)
    at App.synth (/Users/jmquij0106/git/charcot/node_modules/aws-cdk-lib/core/lib/stage.js:1:2263)
    at synthInRoot (file:///Users/jmquij0106/git/charcot/node_modules/sst/stacks/synth.js:58:34)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.synth (file:///Users/jmquij0106/git/charcot/node_modules/sst/stacks/synth.js:19:16)
    at async buildApp (file:///Users/jmquij0106/git/charcot/node_modules/sst/cli/commands/bind.js:86:13)
    at async Object.handler (file:///Users/jmquij0106/git/charcot/node_modules/sst/cli/commands/bind.js:53:9)
    at process.<anonymous> (file:///Users/jmquij0106/git/charcot/node_modules/sst/cli/sst.js:58:21)
    at process.emit (node:events:525:35)
    at process.emit (node:domain:489:12)
    at process._fatalException (node:internal/process/execution:149:25)
    at processPromiseRejections (node:internal/process/promises:288:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)

Need help with this error? Post it in #help on the SST Discord https://sst.dev/discord
© www.soinside.com 2019 - 2024. All rights reserved.