Skip to content

Commit

Permalink
Merge pull request #12 from video-db/fix/active-nvm-on-run
Browse files Browse the repository at this point in the history
activate nvm on run, and dont set installed nvm as default in setup
  • Loading branch information
0xrohitgarg authored Oct 24, 2024
2 parents f14e400 + ab8e1a9 commit b4d3a34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ update:
@npm update

run:
@if [ -f "$$NVM_DIR/nvm.sh" ]; then \
. "$$NVM_DIR/nvm.sh" && nvm use 22.8.0 || echo "⚠️ Warning: Unable to switch to Node.js 22.8.0. Continuing with current version."; \
elif [ -f "$$HOME/.nvm/nvm.sh" ]; then \
. "$$HOME/.nvm/nvm.sh" && nvm use 22.8.0 || echo "⚠️ Warning: Unable to switch to Node.js 22.8.0. Continuing with current version."; \
else \
echo "ℹ️ Note: nvm is not installed or not properly configured. Using system's default Node.js version."; \
fi
@npm run dev
1 change: 0 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ install_node_with_nvm() {
if confirm "Would you like to install Node.js version $node_version using nvm?"; then
nvm install $node_version
nvm use $node_version
nvm alias default $node_version
echo "✅ Node.js $node_version and npm have been successfully installed with nvm!"
else
echo "⏭️ Skipping Node.js installation."
Expand Down

0 comments on commit b4d3a34

Please sign in to comment.