Reputation: 91
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?
Upvotes: 3
Views: 10840
Reputation: 91
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
Upvotes: 2