question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot read property 'match' of undefined

See original GitHub issue

hello, i get the following error during sls deploy:

...
layers:
  None
Serverless: [AWS cloudformation 200 0.104s 0 retries] describeStacks({ StackName: 'xxx-home-dev' })
 
  Type Error ---------------------------------------------
 
  Cannot read property 'match' of undefined
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Stack Trace --------------------------------------------
 
TypeError: Cannot read property 'match' of undefined
    at provider.request.then.resp (/builds/xxx/home/node_modules/serverless-apigw-binary/src/index.js:19:30)
From previous event:
    at resolve (/builds/xxx/home/node_modules/serverless-apigw-binary/src/index.js:15:122)
    at new Promise (<anonymous>)
    at BinarySupport.getApiId (/builds/xxx/home/node_modules/serverless-apigw-binary/src/index.js:14:12)
    at BinarySupport.afterDeploy (/builds/xxx/home/node_modules/serverless-apigw-binary/src/index.js:59:17)
    at BbPromise.reduce (/builds/xxx/home/node_modules/serverless/lib/classes/PluginManager.js:391:55)
From previous event:
    at PluginManager.invoke (/builds/xxx/home/node_modules/serverless/lib/classes/PluginManager.js:391:22)
    at PluginManager.run (/builds/xxx/home/node_modules/serverless/lib/classes/PluginManager.js:422:17)
    at variables.populateService.then.then (/builds/xxx/home/node_modules/serverless/lib/Serverless.js:111:33)
    at processImmediate (timers.js:632:19)
    at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
    at Serverless.run (/builds/xxx/home/node_modules/serverless/lib/Serverless.js:98:6)
    at serverless.init.then (/builds/xxx/home/node_modules/serverless/bin/serverless:43:28)
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           11.8.0
     Serverless Version:     1.36.3

serverless.yml

custom:
  ...
  apigwBinary:
    types:
      - '*/*'

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

2reactions
julienvalletcommented, Feb 9, 2022

Since v1.42 the serverless framework supports binary media type responses, so serverless-apigw-binary is no longer necessary (https://www.serverless.com/blog/framework-release-v142)

provider:
  apiGateway:
  binaryMediaTypes:
   - '*/*'
2reactions
joefhallcommented, Sep 2, 2019

@InkFaust could you let me know how you solved this problem in your case? I’m running into the same issue. (@Bookrage001’s suggestion above of installing the package using npm doesn’t solve it for me unfortunately.)

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack: Cannot read property 'match' of undefined
Simple answer just run rm -rf package-lock.json.
Read more >
NPM - Cannot read property "match" of undefined
While not a root-cause solution, a workaround is: Delete node_modules and package-lock. json.
Read more >
Cannot read property .match of undefined - Heroku Help
Running an npm command, such as npm install or npm ci , may raise something like this: npm err TypeError: Cannot read property...
Read more >
[BUG] npm ERR! Cannot read property 'match' of undefined
The root cause and the fix for this issue, is probably during npm i it should do a check on the generated package-lock....
Read more >
npm err! cannot read property 'match' of undefined - You.com
The root cause and the fix for this issue, is probably during npm i it should do a check on the generated package-lock.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found