Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

node failed to build after latest formula update #34432

Closed
dalguji opened this issue Nov 25, 2014 · 5 comments
Closed

node failed to build after latest formula update #34432

dalguji opened this issue Nov 25, 2014 · 5 comments

Comments

@dalguji
Copy link
Contributor

dalguji commented Nov 25, 2014

node installation failed after doing "brew update && brew upgrade" yesterday.

I tried "brew install node" after "brew rm --force node", but it was the same. I doubt this issue is related to #34413

Any thoughts please?

[log] brew install node => http://pastebin.com/Rp4rq1c1
[log] /usr/local/lib/node_modules/npm/npm-debug.log => http://pastebin.com/v0a45sDS
[log] brew gist-logs node => https://gist.github.com/dalguji/acd7b5f40293112043dd

@DomT4
Copy link
Member

DomT4 commented Nov 25, 2014

Node used to make heavy use of Xcode during the build process, so attempting to build with CLT-only used to be expected to generate the xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance message you are seeing.

However, this was supposed to have been fixed by this PR upstream at Node but perhaps something about the latest changes borked that. The last change was an npm update though, and to my knowledge npm doesn't require Xcode, although there have been issues on the tracker before about CLT-Only problems.

Try using this script and then doing brew install -v node again afterwards. There are some errors in the npm file you linked to that will be flushed out by this script, which may help.

If that doesn't work, IMO, unless one of the maintainers drops by to recommend something otherwise, I'd punt this back to Node for comment as to whether something could have triggered the Xcode requirement again.

@dalguji
Copy link
Contributor Author

dalguji commented Nov 26, 2014

Thanks for your advice, @DomT4. I ran your script, terminatenode.sh on my machine. It looked like the script was trying to delete all Homebrew's /user/local/Cellar/* so I stopped it as below. Would it be an expected effect?

$ bash terminatenode.sh 
This will completely erase all traces of Node/npm from your system. You will be asked to enter your password for sudo. Proceed? (y/n)y
We'll make a backup of your npm installed list so you can reference it later if desired.
terminatenode.sh: line 7: npm: command not found
terminatenode.sh: line 8: npm: command not found
Lists have been created! You'll find them in whatever directory you are currently cd'ed into.

Error: No such keg: /usr/local/Cellar/node
Removing: /usr/local/Cellar/atk/2.10.0...
Removing: /usr/local/Cellar/atk/2.12.0...
Removing: /usr/local/Cellar/bash/4.3.25...
Removing: /usr/local/Cellar/bash/4.3.26...
Removing: /usr/local/Cellar/bash/4.3.27...
Removing: /usr/local/Cellar/bash/4.3.28...
Removing: /usr/local/Cellar/boost/1.55.0...

Removing: /usr/local/Cellar/boost/1.55.0_1...
Removing: /usr/local/Cellar/boost/1.55.0_2...
Removing: /usr/local/Cellar/cairo/1.12.16...
Removing: /usr/local/Cellar/cairo/1.12.16_1...
Removing: /usr/local/Cellar/cmake/2.8.12...
Removing: /usr/local/Cellar/cmake/2.8.12.1...
Removing: /usr/local/Cellar/cmake/2.8.12.2...
Removing: /usr/local/Cellar/cmake/3.0.0...
^C
^C
If it says a file/folder can't be found, this is a good thing!
Password:
Password:
Password:

@DomT4
Copy link
Member

DomT4 commented Nov 26, 2014

What you're seeing there isn't the script deleting Homebrew, but the script executing 'brew cleanup', which removes outdated things from the Cellar. It only uses internal Homebrew mechanisms for that stage, so there's no risk of it going rogue and deleting things it shouldn't be from Homebrew :).

Sent from my iPhone

On 26 Nov 2014, at 06:24, dalguji notifications@github.com wrote:

Thanks for your advice, @DomT4. I ran your script, terminatenode.sh on my machine. It looked like the script was trying to delete all Homebrew's /user/local/Cellar/* so I stopped it as below. Would it be an expected effect?

$ bash terminatenode.sh
This will completely erase all traces of Node/npm from your system. You will be asked to enter your password for sudo. Proceed? (y/n)y
We'll make a backup of your npm installed list so you can reference it later if desired.
terminatenode.sh: line 7: npm: command not found
terminatenode.sh: line 8: npm: command not found
Lists have been created! You'll find them in whatever directory you are currently cd'ed into.

Error: No such keg: /usr/local/Cellar/node
Removing: /usr/local/Cellar/atk/2.10.0...
Removing: /usr/local/Cellar/atk/2.12.0...
Removing: /usr/local/Cellar/bash/4.3.25...
Removing: /usr/local/Cellar/bash/4.3.26...
Removing: /usr/local/Cellar/bash/4.3.27...
Removing: /usr/local/Cellar/bash/4.3.28...
Removing: /usr/local/Cellar/boost/1.55.0...

Removing: /usr/local/Cellar/boost/1.55.0_1...
Removing: /usr/local/Cellar/boost/1.55.0_2...
Removing: /usr/local/Cellar/cairo/1.12.16...
Removing: /usr/local/Cellar/cairo/1.12.16_1...
Removing: /usr/local/Cellar/cmake/2.8.12...
Removing: /usr/local/Cellar/cmake/2.8.12.1...
Removing: /usr/local/Cellar/cmake/2.8.12.2...
Removing: /usr/local/Cellar/cmake/3.0.0...
^C
^C
If it says a file/folder can't be found, this is a good thing!
Password:
Password:
Password:

Reply to this email directly or view it on GitHub.

@dalguji
Copy link
Contributor Author

dalguji commented Nov 27, 2014

brew install node worked fine after running your script till the end. It seemed sudo rm -r /usr/local/lib/node_modules was one of the most critical parts to my machine. Thanks again. :)

@DomT4
Copy link
Member

DomT4 commented Nov 27, 2014

Awesome. Glad things are running normally again for you 👍. Absolutely no worries, more than happy to help.

@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants