Skip to content

Commit

Permalink
Fix link out of package error
Browse files Browse the repository at this point in the history
deeze.sh -b error out with:
/usr/local/lib/node_modules/asar/lib/filesystem.js:101
      throw new Error(`${p}: file "${link}" links out of the package`)
            ^

Error: app/node_modules/abstract-socket/build/node_gyp_bins/python3: file "../../../../../../../../../../../usr/bin/python3.10" links out of the package
    at Filesystem.insertLink (/usr/local/lib/node_modules/asar/lib/filesystem.js:101:13)
    at handleFile (/usr/local/lib/node_modules/asar/lib/asar.js:132:20)
    at next (/usr/local/lib/node_modules/asar/lib/asar.js:148:11)
    at next (/usr/local/lib/node_modules/asar/lib/asar.js:149:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

workaround it by removing this symlink before calling "asar pack app app.asar".

The upstream issue is not fixed yet:
nodejs/node-gyp#2713
"node_gyp_bins causes build failures in downstream packages"
  • Loading branch information
prahal committed Oct 9, 2022
1 parent 5dfd2e0 commit 0402320
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deezer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ build()
# Add start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12)
patch --forward --strip=1 --input="../../../../start-hidden-on-tray.patch"

cd .. && asar pack "app" "app.asar"
cd .. && \
rm app/node_modules/abstract-socket/build/node_gyp_bins/python3 || true && \
asar pack "app" "app.asar"

[ ! -d "$pkgdir" ] && mkdir -p "$pkgdir"
[ ! -d "$pkgdir/DEBIAN/" ] && sudo mkdir -p "$pkgdir/DEBIAN/"
Expand Down

0 comments on commit 0402320

Please sign in to comment.