serverless-nextjs / serverless-next.js

⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
MIT License
4.44k stars 454 forks source link

Error on AWS: ApiGatewayResourceProxyVar resource already has a variable path part #206

Open gustavorps opened 4 years ago

gustavorps commented 4 years ago

Describe the bug

Serverless: Operation failed!
Serverless: View the full error output: https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aus-east-1%3A420353426084%3Astack%2Ffbhunter-applications-web-survey-dev%2F35d163b0-eebf-11e9-9861-0a325fb8c980

  Serverless Error ---------------------------------------

  An error occurred: ApiGatewayResourceProxyVar - A sibling ({uid}) of this resource already has a variable path part -- only one is allowed (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: 011205b8-7ed0-445a-8743-4d0b55d79264).

To Reproduce

  1. Create a react-next-app with dynamic Router in dir Create an example contains two dynamic pages:

    1. pages/post/[id]/index.js e.g. matches /post/my-example (/post/:id)
    2. pages/post/[id]/[comment].js e.g. matches /post/my-example/a-comment (/post/:id/:comment)
  2. Follow this serverless
    
    service: app-web-survey
    stage: dev
    region: sa-east-1

provider: name: aws runtime: nodejs10.x memorySize: 128

plugins:

package: exclude:

Expected behavior A happy deployed nuxt.js app with dynamic routing

Desktop (please complete the following information):

Operating System:          linux
Node Version:              10.15.1
Framework Version:         1.54.0
Plugin Version:            3.1.2
SDK Version:               2.1.2
Components Core Version:   1.1.1
Components CLI Version:    1.2.3
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sebastianmacarescu commented 3 years ago

Did you find a reason for this?