From 83c6103db23ce383a23097832bdf15d71f775665 Mon Sep 17 00:00:00 2001 From: Akihiro Nagai <77012577+akihironagai@users.noreply.github.com> Date: Tue, 28 Feb 2023 02:12:21 +0900 Subject: Add pnpm in Node (#450) * Add pnpm in Node * pnpm from npm * Restore README.md * Update install.sh * Update tests --- src/node/install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/node/install.sh') diff --git a/src/node/install.sh b/src/node/install.sh index 4c02c95..9048ac2 100755 --- a/src/node/install.sh +++ b/src/node/install.sh @@ -183,6 +183,17 @@ if [ ! -z "${ADDITIONAL_VERSIONS}" ]; then IFS=$OLDIFS fi +# Install pnpm +if type pnpm > /dev/null 2>&1; then + echo "pnpm already installed." +else + if type npm > /dev/null 2>&1; then + npm install -g pnpm + else + echo "Skip installing pnpm because npm is missing" + fi +fi + # If enabled, verify "python3", "make", "gcc", "g++" commands are available so node-gyp works - https://github.com/nodejs/node-gyp if [ "${INSTALL_TOOLS_FOR_NODE_GYP}" = "true" ]; then echo "Verifying node-gyp OS requirements..." -- cgit v1.2.3