当我使用以下方法部署我的无服务器 API 时:
serverless deploy
Run Code Online (Sandbox Code Playgroud)
lambda 层已创建,但是当我运行该函数时,出现此错误:
"Cannot find module 'request'"
Run Code Online (Sandbox Code Playgroud)
但是,如果我通过控制台手动上传 .zip 文件(部署时上传的完全相同的文件),它工作正常。
任何人都知道为什么会发生这种情况?
environment:
SLS_DEBUG: "*"
provider:
name: aws
runtime: nodejs8.10
stage: ${opt:api-type, 'uat'}-${opt:api, 'payment'}
region: ca-central-1
timeout: 30
memorySize: 128
role: ${file(config/prod.env.json):ROLE}
vpc:
securityGroupIds:
- ${file(config/prod.env.json):SECURITY_GROUP}
subnetIds:
- ${file(config/prod.env.json):SUBNET}
apiGateway:
apiKeySourceType: HEADER
apiKeys:
- ${file(config/${opt:api-type, 'uat'}.env.json):${opt:api, "payment"}-APIKEY}
functions:
- '${file(src/handlers/${opt:api, "payment"}.serverless.yml)}'
package:
# individually: true
exclude:
- node_modules/**
- nodejs/**
plugins:
- serverless-offline
- serverless-plugin-warmup
- serverless-content-encoding
custom:
contentEncoding:
minimumCompressionSize: 0 # Minimum body size required for …
Run Code Online (Sandbox Code Playgroud) 是否有任何调用BlackBerry 10浏览器在onclick
活动中打开的示例?我正在尝试使用c ++使用本机SDK.
谢谢