help
help copied to clipboard
Can't read and write to target executable
Node.js Version
v21.6.2
NPM Version
10.8.1
Operating System
macOS
Subsystem
Other
Description
I followed these steps https://nodejs.org/api/single-executable-applications.html When I run
npx postject hello NODE_SEA_BLOB sea-prep.blob \
--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_SEA
I get:
Start injection of NODE_SEA_BLOB in hello... Error: Can't read and write to target executable
Related to: https://github.com/nodejs/help/issues/4313#issuecomment-2154980165
Minimal Reproduction
No response
Output
No response
Before You Submit
- [X] I have looked for issues that already exist before submitting this
- [X] My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask
First, check that the hello binary file is available and your blob name is exactly sea-prep.blob. :) I hope I helped you
First, check that the hello binary file is available and your blob name is exactly sea-prep.blob. :) I hope I helped you
Yup, the binary is there. the sea-prep.blob is there.
Make sure you are calling the binary from a user account that has access to write it and the directory it's in (but I'm not a SEA expert)
Make sure you are calling the binary from a user account that has access to write it and the directory it's in (but I'm not a SEA expert)
Okay, running by sudo solved the initial issue but, the generated bin is not runnable on macOS:
[1] 8752 killed hello --version
@nodejs/single-executable PTAL, thanks!
The executable file might not have the necessary permissions. Check for permissions.
Need to run
chmod 755 hello
Per the comments above