Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppSync Simulator: TypeError: Cannot convert undefined or null to object

(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

like image 810
account web Avatar asked Jan 24 '26 16:01

account web


1 Answers

sorry, this issue has been resolved It was a "serverless-appsync-simulator" and "cfn-resolver-lib" dependency issue

 "cfn-resolver-lib": "^1.1.8" →  "cfn-resolver-lib": "^1.1.7"

Downgrade “cfn-resolver-lib”

Thanks guys!

like image 156
account web Avatar answered Jan 26 '26 11:01

account web



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!