小编SMT*_*ing的帖子

Yaml-schema 抛出不正确的错误消息

我收到String is longer than the maximum length of 1.yaml-schema: AWSDynamoDBTableAttributeDefinition 以下代码块的错误

TodosTable:
  Type: AWS::DynamoDB::Table
  Properties:
    TableName: Todos-${self:provider.stage}
    AttributeDefinitions:
      - AttributeName: todoId
        AttributeType: S
      - AttributeName: createdAt
        AttributeType: S
      - AttributeName: name
        AttributeType: S
      - AttributeName: dueDate
        AttributeType: S
    KeySchema:
      - AttributeName: todoId
        KeyType: HASH
      - AttributeName: createdAt
        KeyType: RANGE
    BillingMode: PAY_PER_REQUEST
    StreamSpecification:
      StreamViewType: NEW_IMAGE
    LocalSecondaryIndexes:
      - IndexName: todoNameIndex
        KeySchema:
          - AttributeName: todoId
            KeyType: HASH
          - AttributeName: name
            KeyType: RANGE
        Projection:
          ProjectionType: ALL
Run Code Online (Sandbox Code Playgroud)

解释: yaml 模式似乎将AttributeName与混淆了AttributeType。因为它期望字符串只有一个字符。 …

yaml serverless aws-serverless

9
推荐指数
0
解决办法
217
查看次数

Dotenv 与 create-react-app 反应脚本出现问题/错误

我的反应应用程序中不断收到此错误

    Compiled with problems: X

    ERROR in ./ node_modules / dotenv / lib / main.js 1: 11 - 24

    Module not found: Error: Can't resolve 'fs' in 'C: \Users\USER\Desktop\dapps\nefty\node_modules\dotenv\lib'


    ERROR in ./ node_modules / dotenv / lib / main.js 3: 13 - 28

    Module not found: Error: Can't resolve 'path' in 'C: \Users\USER\Desktop\dapps\nefty\node_modules\dotenv\lib'

    BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
    This is no longer the case. Verify if you need this module …
Run Code Online (Sandbox Code Playgroud)

reactjs webpack react-scripts create-react-app dotenv

7
推荐指数
1
解决办法
1万
查看次数