Wrong serverless-http dependency version in the basic express template
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, express, javascript
Direzione di ricerca
Inizia con il template di base AWS - Node.js - Express API with DynamoDB e ispeziona la dipendenza dichiarata da serverless-http. Confronta la versione del template con l’ambiente Serverless Framework 3 segnalato, aggiorna la dipendenza se appropriato e verifica che serverless deploy --verbose venga completato senza l’errore segnalato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 11.5k
- Fork
- 4.4k
- Merge medio
- 2h 55m
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di serverless/examples
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
serverless/examples#404 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
serverless/examples#809 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
serverless/examples#793 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
serverless/examples#784 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
serverless/examples#782 ·
Tutte le issue di serverless/examples
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Issue-Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
sugarlabs/musicblocks#8924 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Apertacustomer-eng status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100