I have a postinstall script in my package.json file for a node module, that locates a file within the node module and copies it to another directory. if I run the post install script by itself, it executes without issue. However, when I make a tarball of the module and try to install it in another repo, I get a permission denied and exit status 126 message. I tried simplifying the file to a single console.log("foo") line and it still fails to execute. I have manually checked all permissions the target directory and all its parent directories; they are read-write for everyone (Mac). Has anyone encountered this?
I hadn't found this thread until it showed up as related to my posted question, but this solved my problem.
npm install - how to run build scripts with sufficient permissions?
Thanks to Pascal Belloncle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With