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.

Where should installer be called?

See original GitHub issue

Hi there! I’m having trouble figuring out where to run this script from 😅

I’m using this tool with nativefier, to address https://github.com/jiahaog/nativefier/issues/207

Behavior

I tried to run the example code as a node script. This required me to install electron (which I installed locally). After that, I see the following error

/Applications/node_modules/electron-devtools-installer/dist/utils.js:27                                                                                                             [1/651]
  var savePath = (_electron.remote || _electron2.default).app.getPath('userData');
                                                              ^

TypeError: Cannot read property 'getPath' of undefined
    at getPath (/Applications/node_modules/electron-devtools-installer/dist/utils.js:27:63)
    at Object.<anonymous> (/Applications/node_modules/electron-devtools-installer/dist/index.js:40:59)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Applications/CCI-slack/react-devtools.js:1:124)

Proposed fix

Given there’s just something wrong in my environment (I’m assuming I’m writing this code in wrong place) then it we could add a section to the documentation explaining where that code should be.

Extra info

FWIW, the result of (_electron.remote || _electron2.default) is a string path 😀

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
nklaymancommented, Dec 12, 2018

Call it inside of the app.on('ready') event listener.

app.on('ready', async () => {
  installDevtools(...)
  ...
});
5reactions
wmhiltoncommented, Jan 10, 2019

Call it inside of the app.on(‘ready’) event listener.

That’s the magic puzzle piece that’s missing from the README! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Installer folder - Microsoft Community
The "installer" folder resides in a protection area that is governed by UAC, as do all files/folders in the c:\windows directory...so you will...
Read more >
Windows Installer - Wikipedia
Windows Installer is a software component and application programming interface (API) of Microsoft Windows used for the installation, maintenance, ...
Read more >
What is the $Windows~BT Folder in Windows 10? - groovyPost
Windows 10 setup creates a folder called $Windows~BT, which is used to facilitate the installation. Find out what it is and whether you...
Read more >
How to Make an "EXE" Installation File - MakeUseOf
The Custom compiler output folder is where the resulting installer EXE file will be placed. · Compiler output base file name is what...
Read more >
install — CMake 3.25.1 Documentation
During component-specific installation only install rules associated with the given component name will be executed. During a full installation all ...
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