Skip to content

Commit 3d6cd8c

Browse files
author
dfounderliu
committed
fix: role&remove
1 parent de09fd6 commit 3d6cd8c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

example/serverless.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ app: websiteApp
55
stage: dev
66

77
inputs:
8+
src:
9+
root: ./
10+
hook: npm run build
11+
index: index.html
12+
error: index.html
813
region: ap-guangzhou
914
bucketName: my-bucket
1015
protocol: http

src/serverless.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class Express extends Component {
4545

4646
// 获取腾讯云密钥信息
4747
if (!this.credentials.tencent.tmpSecrets) {
48-
throw new Error('Please add SLS_QcsRole in your tencent account.')
48+
throw new Error(
49+
"Couldn't get your SecretId/Key, Please add SLS_QcsRole For Serverless Framework or Update Serverless Framework CLI(At least 1.67.3)"
50+
)
4951
}
5052
const credentials = {
5153
SecretId: this.credentials.tencent.tmpSecrets.TmpSecretId,
@@ -145,7 +147,9 @@ class Express extends Component {
145147

146148
// 获取腾讯云密钥信息
147149
if (!this.credentials.tencent.tmpSecrets) {
148-
throw new Error('Please add SLS_QcsRole in your tencent account.')
150+
throw new Error(
151+
"Couldn't get your SecretId/Key, Please add SLS_QcsRole For Serverless Framework or Update Serverless Framework CLI(At least 1.67.3)"
152+
)
149153
}
150154
const credentials = {
151155
SecretId: this.credentials.tencent.tmpSecrets.TmpSecretId,

0 commit comments

Comments
 (0)