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.

Cannot destructure property `Menu` of 'undefined' or 'null'

See original GitHub issue

I using Vue +Typescript + Electron

In App.ts file:

import { Vue, Component, Watch } from 'vue-property-decorator'
import { remote } from 'electron'

const { Menu } = remote

I get this error after jest running

TypeError: Cannot destructure property "Menu" of "undefined" or "null"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

15reactions
gfijrbcommented, May 8, 2020

so what was the problem?

1reaction
jimhuckslycommented, Feb 14, 2020
Cannot read property 'dispatch' of undefined

mounted() {
    > 28 |     this.$store.dispatch(...)

Jest is wonderful

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Cannot destructure property .... as undefined
It is probably because the value of sentEmailStatus it's undefined when the component renders, during the first rendering.
Read more >
Cannot destructure Property of Undefined Error in JS
The "Cannot destructure property of undefined" error occurs when we try to destructure a property from a value that is equal to undefined...
Read more >
TypeError: Cannot destructure property '…' of 'Object ...
ReactJS Pass Functions through Context — TypeError: Cannot destructure property '…' of 'Object(…)(…)' as it is undefined. · Real reason of failure:.
Read more >
Cannot destructure property `auth` of 'undefined' or 'null'
Coding example for the question Cannot destructure property `auth` of 'undefined' or 'null'-node.js.
Read more >
Modern JavaScript: Basic object destructuring
TypeError : Cannot destructure property 'name' of 'null' as it is null. ... const {name} = undefined;. Result: TypeError ...
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