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.

No dice: ENOENT: no such file or directory, open 'resources/app/package.json'

See original GitHub issue

I might be misunderstanding some standard directory structure for all electron app, but I have a simple hello-world app on my local directory (from https://github.com/ungoldman/electron-hello-world) and I can run the app just fine with “electron .”

When I try to run windows-installer with following script

var electronInstaller = require('electron-winstaller');

resultPromise = electronInstaller.createWindowsInstaller({
    appDirectory: '.',
    outputDirectory: '~/tmp',
    authors: 'My App Inc.',
    exe: 'myapp.exe'
  });

resultPromise.then(() => console.log("It worked!"), (e) => console.log(`No dice: ${e.message}`));

I get following error message.

$ node win.js 
No dice: ENOENT: no such file or directory, open '/home/hayashis/test/electron-hello-world/resources/app/package.json'

It looks like I am supposed to put all files under resources/app directory… But I can’t figure out where it comes from. Is it a standard to place everything under resources/app directory?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

22reactions
MarshallOfSoundcommented, May 25, 2016

You must first use a tool such as electron-packager to package the app into the structure that windows-installer expects.

1reaction
antonkarstencommented, Sep 8, 2017

I had the same problems (on ubuntu). Two things solved it for me

  1. install mono (http://www.mono-project.com/download/#download-lin)
  2. make sure you build with electron-packager using the --asar=true switch (I had turned it of to be able to troubleshoot the result from the packager)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - No dice: ENOENT: no such file or directory, open ...
I might be misunderstanding some standard directory structure for all electron app, but I have a simple hello-world app on my local directory...
Read more >
local` are deprecated. use `--location=global` instead. - You.com
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\test\package.json'. npm ERR! enoent This is related to npm not being able to...
Read more >
ElectronアプリをMac上でWindows向けにビルドする
via JS or CLI · No dice: ENOENT: no such file or directory, open 'resources/app/package.json' · Issue #96 · electron/windows-installer · ...
Read more >
electron-winstaller-fixed - npm
Defaults to the author field from your app's package.json file when ... owners, No, The owners value for the nuget package metadata.
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