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.

node-notifier is not put in .asar.unpacked

See original GitHub issue
  • Version: 19.16.0

  • Target: MacOS

I’m building an app that uses node-notifier. When in dev, it works correctly. However, once packaged, there are no notifications, and no error is thrown. It turns out that node-notifier’s included executables are not automatically detected and put in the .asar.upacked upon build, which prevents to call the executables.

As a workaround, adding "asarUnpack": ["./node_modules/node-notifier/vendor/**"] to the config works.

This problem did not happen before I bumped electron-builder from 16.1.0 to 19.16.0 .

I know this issue is similar to #1683 , but it’s not the same, as in it the executables are put in the .asar.unpacked but somehow are not executed.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
arantes555commented, May 15, 2018

@develar I’m sorry but the issue is still not obsolete. I just tested right now with the latest electron-builder, and the issue still exists. The existence of the Notification API should not in any way allow electron-builder to not do what its doc says and put executables in .asar.unpacked automatically, just because in this specific case it happens to be a package that deals with notifications.

0reactions
bvalliercommented, Nov 30, 2018

Add “node-notifier”: “^5.3.0” to your dependencies (in addition to your devDependencies) and try to rebuild. That worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-notifier - npm
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback). Latest version: 10.0.1, ......
Read more >
Electron cannot open shared object file from node_modules ...
I can now see the files in the app.asar.unpacked/node_modules/vosk/lib/ folder, but when executing the app, I'm still having the same error. I ...
Read more >
Masterpiece Studio update for 23 March 2020 · SteamDB
An update was detected, but we have no official patch notes for it ... /app.asar.unpacked/node_modules/node-notifier/vendor/terminal-notifier-LICENSE (1.26 ...
Read more >
How to Pack a Electron app | TripleZ's Blog
If you include the npm module node-notifier in your Electron application and use the --asar option while packaging, you may find this error ......
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
This can happen if Windows Subsystem for Linux (WSL) is not set up with a valid ... {install_path}\resources\app\node_modules.asar.unpacked\node-pty\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