electron-builder: Problem with linked npm packages and asar

  • Version: 5.26.0
  • Target: mac

One of my node modules is linked via npm link and I get an error during build:

> build --dir

Skip app dependencies rebuild because dev and app dependencies are not separated
Packaging for platform darwin x64 using electron 1.3.3 to dist/mac

Error: /Users/anri/myapp/node_modules/myapp-lib: file links out of the package
    at Filesystem.insertLink (/Users/anri/myapp/node_modules/asar-electron-builder/lib/filesystem.js:82:15)
    at /Users/anri/myapp/node_modules/electron-builder/src/asarUtil.ts:316:28
    at next (native)...

Without linking it works fine.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Not clear for me — why you need to have packed app often. Why you cannot use electron-prebuilt?

In any case — there is a workaround — build.dereference added for you. Disable asar:

"asar": false,
"dereference": true

add this to your build. Next version will be published soon. Is it suitable for you?

Any hints on how to potentially fix the ‘copy as is’ issue with linked packages?

This issue in any case should be fixed before, right?