Skip to content

Adding commands needed for brew and nodejs

Ian Pedowitz requested to merge ipedowitz-master-patch-12283 into master

Why is this change being made?

While setting up a MacBook Pro, I ran into two errors on Homebrew and Node.js. Inserting the needed commands where I think they should go, but open to other suggestions.

Homebrew

ipedowitz@Ians-MBP ~ % /bin/zsh -c "$(curl -fsSL https://gitlab.com/gitlab-com/www-gitlab-com/-/raw/master/scripts/setup-macos-dev-environment.sh)"
Repo found: /Users/ipedowitz/www-gitlab-com
Is this the location of the GitLab handbook on your computer? (/Users/ipedowitz/www-gitlab-com)
1) Yes  2) No   
?# 1
REPO_LOCATION: /Users/ipedowitz/www-gitlab-com
brew not found
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R ipedowitz:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at 1c1a720d9 Merge pull request #13326 from samford/curl/check-all-responses-for-protected-cookies
Warning: /opt/homebrew/bin is not in your PATH.
  Instructions on how to configure your shell for Homebrew
  can be found in the 'Next steps' section below.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ipedowitz/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh

installhomebrew:11: command not found: brew
installasdf:3: command not found: brew
installasdf:5: command not found: brew
. /asdf.sh
legacy_version_file = yes
/Users/ipedowitz/.zshrc:.:2: no such file or directory: /asdf.sh
installasdf:28: command not found: asdf
installasdf:29: command not found: asdf
handbook:6: command not found: asdf
handbook:7: command not found: asdf
handbook:9: command not found: asdf
handbook:10: command not found: asdf
handbook:12: command not found: asdf
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.2.22) required by your /Users/ipedowitz/www-gitlab-com/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.2.22`
   from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
   from /usr/bin/bundle:23:in `<main>'
yarn not found
handbook:26: command not found: npm
handbook:30: command not found: yarn
This tool will attempt tell you if you have all of the prerequisites to properly edit and run the GitLab handbook locally.
It checks the current Ruby version available to what is required, presence of the Bundler gem, 
the state of bundled gems, and checks yarn.
❌ Ruby Version Mismatch
You need to install or select 3.0.2
Follow the instructions at https://about.gitlab.com/handbook/git-page-update/#4-install-ruby-version-manager-rvm
Once you've finished with those instructions, you can rerun this script to check other components.

===============================================

If there were no failures listed above, you should now be able to open a new terminal to /Users/ipedowitz/www-gitlab-com and run the sites locally.

See https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/master/README.md#local-development for more instructions.


===============================================

Node.js

yarn not found
No preset version installed for command npm
Please install a version by running one of the following:

asdf install nodejs 16.14.0

or add one of the following versions in your config file at /Users/ipedowitz/www-gitlab-com/.tool-versions
nodejs *
handbook:30: command not found: yarn
This tool will attempt tell you if you have all of the prerequisites to properly edit and run the GitLab handbook locally.
It checks the current Ruby version available to what is required, presence of the Bundler gem, 
the state of bundled gems, and checks yarn.
✅ You have the proper Ruby version installed / selected
✅ Bundler Installed
The Gemfile's dependencies are satisfied
❌ 'yarn check --integrity' failed
Your dependencies probably don't match the yarn.lock file.
Please run 'yarn install' and try again.

===============================================

If there were no failures listed above, you should now be able to open a new terminal to /Users/ipedowitz/www-gitlab-com and run the sites locally.

See https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/master/README.md#local-development for more instructions.


===============================================

Author Checklist

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added.
  • Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI)
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the Maintained by section on the page being edited
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
  • If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR
    • If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.

Edited by Ian Pedowitz

Merge request reports