Issue with preinstall script #145149
Replies: 2 comments 1 reply
-
Hi Elaine, Also here are some discussions on the topic: Hope this works :D |
Beta Was this translation helpful? Give feedback.
-
To be honest, I don't know why the preinstall isn't called in your case, but I can definitely tell you that you can automate your processes using a bash script 😊 Please take a look here https://www.geeksforgeeks.org/bash-scripting-introduction-to-bash-and-bash-scripting/ Bash scripts are widely used in development, especially when more powerful functionality is needed than what npm hooks can provide, so feel free to use it. If you prefer JavaScript, here is another great option https://github.com/google/zx |
Beta Was this translation helpful? Give feedback.
-
Hi!
I am trying to add an auth script that should run to get authentication to an internal package registry (in Google Artifact Registry). I would ideally like the script to run before
npm install
, so I put it in apreinstall
script. However, it doesn't seem like it runs before npm checks if we have permissions to install the package.Here is a video with more details:
https://drive.google.com/file/d/1Wax_g3HYpvKtHUI7f6rq75mr5bIN8Qvf/view?usp=sharing
Is this a known issue?
Thanks in advance for your help!
Elaine
Beta Was this translation helpful? Give feedback.
All reactions