You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Cannot generate bytecode / pkg fails to run "codesign" utility (even when codesign is present) #1574
What Node versions, OSs and CPU architectures are you building for?
node14-macos-x64
Describe the Bug
Running npx pkg fails with the following error:
> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v14.18.3-macos-x64 [====================] 100%
/Users/ryan/.pkg-cache/v3.2/fetched-v14.18.3-macos-x64-signed: is already signed
> Error! Cannot generate bytecode
pkg fails to run "codesign" utility. Due to the mandatory signing
requirement of macOS, executables must be signed. Please ensure the
utility is installed and properly configured.
However, codesign is indeed installed and available:
@brianunlam that's a nice workaround, did the trick for me. It's super brittle for obvious reasons, @jesec@leerob any reason not to incorporate this into the codesign call permanently so we can close this issue?
@brianunlam that's a nice workaround, did the trick for me. It's super brittle for obvious reasons, @jesec@leerob any reason not to incorporate this into the codesign call permanently so we can close this issue?
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
Activity
brianunlam commentedon Jun 1, 2022
I had the same issue. As a workaround you can go to the source code and add a "-f" flag when they call the codesign utility:
pkg/lib/mach-o.ts
Line 62 in b63df87
I started having this issue when I updated my macos version.
ryanblock commentedon Aug 9, 2022
@brianunlam that's a nice workaround, did the trick for me. It's super brittle for obvious reasons, @jesec @leerob any reason not to incorporate this into the
codesigncall permanently so we can close this issue?ryota-ka commentedon Sep 14, 2022
$ sed -e s/--sign/-s/ -i ./node_modules/pkg/lib-es5/mach-o.jsdid the trick for me, FYI.robertsLando commentedon Sep 14, 2022
cc @jesec
brianunlam commentedon Sep 14, 2022
Here it's the pr
#1756
github-actions commentedon Dec 14, 2022
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
ryanblock commentedon Dec 14, 2022
The issue isn’t stale. It has PR, even. Auto-closing issues is gross.
134130 commentedon Mar 7, 2023
@ryanblock The PR #1756 is merged. You can close this Issue
ryanblock commentedon Mar 7, 2023
@134130 happy to close this as soon as the fix is released to production. (Maintainers ofc can also close it should they see fit!)
ryanblock commentedon Mar 11, 2023
It should be out, yay!