Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

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

Open
@gustavorps

Description

@gustavorps

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:
  - serverless-nextjs-plugin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions