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.

How to use app.getAppPath?

See original GitHub issue

I’m trying to access app.getAppPath() in a component, but nothing I have tried is returning this property.

It would be super if the docs included how to do this.

Here is the snippet of the last thing I tried:

const { app } = require('electron');

export default {
  
  name: 'ImportExport',
  
  data: function(){
    return {
      midiAccess: null,
      activePort: null,
      log: [],
      appPath: app.getAppPath()
    }
  },

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ChunAllencommented, Sep 23, 2019

@nklayman any reasons why I’m getting Uncaught TypeError: fs.existsSync is not a function when I’m importing electron

import { remote } from 'electron'

const { app } = remote
1reaction
nklaymancommented, Jul 10, 2019

You need to use Electron Remote:

import { remote } from 'electron'

const { app } = remote

// then just use app.getAppPath()
Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is Electron's app.getAppPath() pointing to?
app.getAppPath() Returns String - The current application directory. From the docs. An asar file is a simple archive format that just appends the...
Read more >
app | Electron
getAppPath () ​. Returns string - The current application directory. app.getPath(name) ​. name string - ...
Read more >
electron.App.getAppPath JavaScript and Node.js ... - Tabnine
How to use. getAppPath. function. in. App. Best JavaScript code snippets using electron.App.getAppPath(Showing top 12 results out of 315). Tabnine vs.
Read more >
JavaScript electron app.getAppPath Examples
JavaScript app.getAppPath - 30 examples found. These are the top rated real world JavaScript examples of electron.app.getAppPath extracted from open source ...
Read more >
How to use the electron.app.getPath function in electron - Snyk
To help you get started, we've selected a few electron.app. ... Use Snyk Code to scan source code in minutes - no build...
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