SST Start'TypeError:Getawscredentials不是函数。

发布于 2025-01-22 07:33:37 字数 217 浏览 0 评论 0原文

我删除了/node_modules/package-lock.json and did npm install

之后,当我进行npx SST start时,我会遇到此错误: typeError:Getawscredentials不是函数。 如何解决这个问题?

I deleted /node_modules and /package-lock.json and did npm install.

After this when I am doing npx sst start I am getting this error:
TypeError: getAwsCredentials is not a function.
How to solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

人生戏 2025-01-29 07:33:37

package.json

old:

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

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

new:

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

Package.json

Old:

"@serverless-stack/cli": "0.69.2",

"@serverless-stack/resources": "0.69.2",

New:

"@serverless-stack/cli": "0.69.6",
"@serverless-stack/resources": "0.69.6",

梦中的蝴蝶 2025-01-29 07:33:37

我从0.63.0中更新了@code>@code>@code>@code>@code-site-env1.18.4我发布此信息时答案和问题解决了,npm install @serverless-stack/static-site-env @最新。在我的情况下,错误是:

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

I updated @serverless-stack/static-site-env from 0.63.0 to latest, 1.18.4 as of the time I posted this answer and problem solved, npm install @serverless-stack/static-site-env@latest. In my case the error was:

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文