Skip to content
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

fix(nms): clean up node installation with make #13464

Merged
merged 1 commit into from
Aug 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 2 additions & 19 deletions orc8r/cloud/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,29 +174,12 @@ else ifeq ($(OS_NAME),Darwin)
$(MAKE) nms_prereqs_osx
endif

nms_prereqs_ubuntu: nms_node_ubuntu
NODE="$(shell which nodejs)"; ln -s $$NODE /usr/local/bin/node
# update nodejs to latest
nms_prereqs_ubuntu:
curl -sL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs
# get codegen dependency
apt install -y nodejs
npm install --global yarn
yarn

nms_node_ubuntu:
# install pre-reqs
apt update
# Handle certificate verification
apt-get install -y libgnutls30
# Get a newer version of nodejs
curl -fSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
# And now install npm
apt install -y aptitude
aptitude install -y npm
# symlink nodejs executable
mkdir -p /usr/local/bin

nms_prereqs_osx:
node --version || brew install node
npm --version || brew install npm
Expand Down