Appsync模拟器:TypeError:无法将未定义或无效转换为对象
(我正在使用Machine Translation.sorry)
构建appsync的本地环境
- 我正在使用无服务器框架无服务器dynamodb-lecal
- -appsync-simulator
- server-server-offline
,当我安装这些sls并使用“ SLS Offline启动时,我都会出现错误“
AppSync Simulator: TypeError: Cannot convert undefined or null to object
顺便说一句,我正在使用打字稿而不是yml来创建一个项目
//appsync
"appsync-simulator": {
location: ".esbuild/.build",
watch: false,
},
//dynamoDB
dynamodb: {
stages: "dev",
start : {
port: 8000,
inMemory: true,
// migrate: true,
// seed: true,
}
},
//esbuild
esbuild: {
bundle: true,
minify: false,
sourcemap: true,
exclude: ["aws-sdk"],
target: "node14",
define: { "require.resolve": undefined },
platform: "node",
concurrency: 10,
},
schema.graphql在根 而且该项目在AWS管理控制台
团队开发中运行良好,需要离线 请帮我
(I am using machine translation.sorry)
I'm building a local environment for appsync using a serverless framework
- Serverless-dynamodb-local
- Serverless-appsync-simulator
- Serverless-offline
I got an error when I installed these and used the "sls offline start" command
AppSync Simulator: TypeError: Cannot convert undefined or null to object
By the way, I'm using typescript instead of yml to create a project
//appsync
"appsync-simulator": {
location: ".esbuild/.build",
watch: false,
},
//dynamoDB
dynamodb: {
stages: "dev",
start : {
port: 8000,
inMemory: true,
// migrate: true,
// seed: true,
}
},
//esbuild
esbuild: {
bundle: true,
minify: false,
sourcemap: true,
exclude: ["aws-sdk"],
target: "node14",
define: { "require.resolve": undefined },
platform: "node",
concurrency: 10,
},
schema.graphql is at the root
And this project works fine in the AWS Management Console
Team development requires offline
Please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,这个问题已经解决
这是一个“无服务器 - 应用程序模拟器”和“ cfn-Resolver-lib”依赖项问题
降级“ CFN-Resolver-lib”
,谢谢。
sorry, this issue has been resolved
It was a "serverless-appsync-simulator" and "cfn-resolver-lib" dependency issue
Downgrade “cfn-resolver-lib”
Thanks guys!