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.

Problem with linked npm packages and asar

See original GitHub issue
  • 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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
develarcommented, Aug 26, 2016

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?

0reactions
develarcommented, Oct 19, 2017

19.39.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't the npm link command working? | Benjamin W Fox
This article is for anyone testing npm packages locally and who has struggled (or is struggling) to get to projects connected via npm...
Read more >
asar-dev - npm
Creating Electron app develppment packages with directory link management. ... There are no other projects in the npm registry using asar-dev.
Read more >
Different behaviour between 'npm run' command and windows ...
I.e. cd to to project directory, run npm i -D asar to add it to devDependencies in package.json . Then update your npm-script...
Read more >
Npm link set up advice and troubleshooting - Code Buckets
Troubleshooting npm link · 1. Check you've linked every package · 2. Don't globally install your local packages · 3. Check you've linked...
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
Troubleshoot Visual Studio Code Integrated Terminal launch failures. ... {install_path}\resources\app\node_modules.asar.unpacked\node-pty\build\Release\ ...
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