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.

require('fs-extra') giving error in electron main process

See original GitHub issue

var app = require('app'); var fs = require('fs-extra'); var builder = require('xmlbuilder')

at line 2 it is giving error:

App threw an error when running [SyntaxError: missing ) after argument list] This code is written in electron main process which uses node.js

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jprichardsoncommented, Apr 8, 2017

I’d add to this @gaikwadrahul20 - I’ve been using fs-extra in Electron for 1.5 years now (both renderer and main), and I’ve had no problems.

1reaction
RyanZimcommented, Apr 7, 2017

@gaikwadrahul20 Please post the full error, including the stack trace. I suspect this is a problem with your code, not ours.

Read more comments on GitHub >

github_iconTop Results From Across the Web

require('fs-extra') not loading: throwing error "Cant find module ...
But it says "can't find module "fs-extra". 1) Tried importing local js files using require() method but that fails too. 2) Tried running ......
Read more >
Can't resolve 'fs' in '/home/username/project-directory/src'
I've got a React/Electron app, and can't seem to access Node fs. ... andI've tried const fs = require('fs') and all give the...
Read more >
electron can't resolve 'fs' in | The AI Search Engine You Control
Ok, finally I've found the solution worked for me. The 'target' option should be defined in webpack.config.js . And it shouldn't be {...
Read more >
graceful-fs - npm
Monkey-patching the fs means that no EMFILE errors can possibly occur anywhere in your application, because everything is using the same core fs ......
Read more >
fs-extra.exists JavaScript and Node.js code examples - Tabnine
function Plugin(electron) { this.download=async function (id,userId,pluginId,url) { let webContent=electron.mainWindow.webContents; let mainWindow=electron.
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