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.

Different Settings file path throws error

See original GitHub issue

Uncaught Exception: Error: ENOENT: no such file … …\Settings

// main
import settings from 'electron-settings'

//...
app.setPath('userData', userDataPath + 'some addition');

//...
app.on('ready', function () {
  settings.get('whatver') // boom
}

I checked the path w/ settings.file and indeed it’s not updated on app.setPath.

fs.watch has a lot of caveats - should we really rely on it? At least we must state this in the docs. Dunno if that’s the origin my issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nathanbucharcommented, Jun 6, 2017

Whoops! Read your first statement wrong

  1. No*
  2. Just what you set
  3. Yes
0reactions
black-snowcommented, Jun 6, 2017

@nathanbuchar aren’t 1. and 2. contradicting?

Maybe I should make it more clear:

1.) Will existing settings (i. e. file contents) be copied to the new location upon the call of setPath()? -or- 2.) Will they be copied when I call set() and if yes what will be saved?

😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

11 Ways to Fix "The System Cannot Find The Path Specified ...
1. Run Command Prompt as an Administrator ... Windows utilities cannot access all files and folders available on your device. Administrative ...
Read more >
Several apps use the same path for user.config files ... - MSDN
When I change from working on one to another I get a configuration error the first time I try to access My.Settings.
Read more >
Error While Reading config File - Help - UiPath Forum
Your file path to the config file is not correct. In your zip file at least, there is no 'data' folder as you...
Read more >
Python is throwing error for a file path inside the Project folder ...
The work-around is to get the path of the module you are in and apply the relative path of the resource file to...
Read more >
Configuration | NestJS - A progressive Node.js framework
Depending on the environment, different configuration settings should be used. ... To specify another path for the .env file, set the envFilePath property ......
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