-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue running npm install when using node via homebrew #47
Comments
I have no idea why I was using "#!/bin/evn node" in the first place, replacing that seems fine. Just to be sure: Did the issue only occur when running the commit hook, or already during installation of the npm package? Your description seems to indicate the latter, but I don't understand why that line would cause an issue during installation. |
Using |
To verify the suggested (or other) solutions work, you can check out the repo, patch the one line, then use |
we should dynamically generate this path with |
http://stackoverflow.com/questions/20638520/appropriate-hashbang-for-node-js-scripts says that I'm still not sure what the actual issue is, since this file isn't executed while installing. |
The install script in package.json just references |
@jzaefferer is correct. |
I talked to @ipaintcode about this last night the problem is on commit not on install. but still not sure whats going on since |
even more interesting the |
This is an issue with sourcetree and commit hooks https://answers.atlassian.com/questions/140339/sourcetree-hook-failing-because-paths-don-t-seem-to-be-set-correctly |
Looks like @arschmitz found the culprit, a big thanks to everyone (thanks again @arschmitz) for checking into this. I did do a fresh install on notebook and seems to have fixed the issue. It was a very weird one off that seemed to be breaking unless I changed the #! to the ladder I posted. |
I did a little more looking into this and it turns out this is kind of a real issue. It actually prevents the usage of commit please using any OSX App like the github client, source-tree, sublime git plugin, atom git plugin etc. Basically OSX apps don't have access to the Im really really surprised this has not come up previously on one of the jQuery projects |
@arschmitz could you provide some steps to reproduce with one of those apps? |
@jzaefferer Steps are as follows:
It won't find Node as the |
Hardcoding the |
Thanks for the steps. I wonder if you could create a symbolic link in |
I can't. El Capitan's System Integrity Protection prevents you from writing to most system directories, including those 4 ones that are in the |
We originally ran into this at my company the work around we settled on is documenting that if you use a GUI for committing to open the commit hook and set the path manually. Since this is within the I would just add a note to the documentation about GUI apps and how to fix them and about updating if you bump node versions. Just thinking out loud but maybe we could add a command to do this for the user not real sure about the post install thing so this might be a middle ground |
Can't tell if this is still an issue, since its been a year, I'm closing. |
Terminal output ( {pathToProject } is in place of actual path ) when running npm install (
node v5.1.0
)Due to {pathToProject}/.git/hooks/commit-msg -> #!/bin/evn node
Seems to be since homebrew doesn't use
/usr/bin
for node or even a symlink you have to replace:with
The issue is installing on a fresh machine or having to reclone said project using this npm. Is there any chance of updating this so the CLI doesn't break with homebrew's install of node? It also seems in El Capitan you can't force symlinks in the /usr/bin directory, well maybe if you disabled root user but rather not go down that road.
Example, here's the
ln
command and output when trying to force a symlink to that directory in El Cap:Thanks in advance.
The text was updated successfully, but these errors were encountered: