Wrong serverless-http dependency version in the basic express template
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- aws, express, javascript
調査の方向性
AWS - Node.js - Express API with DynamoDB の基本テンプレートから始め、宣言されている serverless-http 依存関係を確認します。テンプレートのバージョンを報告されている Serverless Framework 3 環境と比較し、適切であれば依存関係を更新して、serverless deploy --verbose が報告されているエラーなしで完了することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Are you certain it's a bug?
- Yes, it looks like a bug
Is the issue caused by a plugin?
- It is not a plugin issue
Are you using the latest v3 release?
- Yes, I'm using the latest v3 release
Is there an existing issue for this?
- I have searched existing issues, it hasn't been reported yet
Issue description
When installing the latest serverless version
(Framework Core: 3.31.0
Plugin: 6.2.3
SDK: 4.3.2)
And creating a new template by running the serverless command and choosing the "AWS - Node.js - Express API with DynamoDB" template, the following exception occurs when trying to run serverless deploy:
Recoverable error occurred (Invalid character in entity name
Line: 0
Column: 176
after a lot of research, chatGPT helped me to find that the serverless-http version which is ^3.1.1 by default is not compatible with serverless version 3.x.
I've changed serverless-http version to ^2.6.1 per its suggestion and my issue has been solved.
Service configuration (serverless.yml) content
service: test
frameworkVersion: '3'
custom:
profiles:
dev: dev
prod: prod
tableName: 'users_table_${sls:stage}'
provider:
name: aws
runtime: nodejs18.x
profile: ${self:custom.profiles.${sls:stage}}
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource:
- Fn::GetAtt: [ UsersTable, Arn ]
environment:
USERS_TABLE: ${self:custom.tableName}
functions:
api:
handler: index.handler
events:
- httpApi: '*'
resources:
Resources:
UsersTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
- AttributeName: userId
AttributeType: S
KeySchema:
- AttributeName: userId
KeyType: HASH
BillingMode: PAY_PER_REQUEST
TableName: ${self:custom.tableName}
Command name and used flags
serverless deploy --verbose
Command output
Recoverable error occurred (Invalid character in entity name
Line: 0
Column: 176
Environment information
Framework Core: 3.31.0
Plugin: 6.2.3
SDK: 4.3.2
- 主要言語
- JavaScript
- スター
- 11.5k
- フォーク
- 4.4k
- 平均マージ
- 2時間 55分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
serverless/examples のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
serverless/examples#404 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
serverless/examples#809 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
serverless/examples#793 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
serverless/examples#784 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
serverless/examples#782 ·
serverless/examples の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mksglu/context-mode#1200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
neondatabase/website#5944 ·
-
module: core
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
bigbluebutton/bigbluebutton#25849 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jaegertracing/jaeger-ui#4506 ·