-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-node.bat
More file actions
37 lines (33 loc) · 961 Bytes
/
test-node.bat
File metadata and controls
37 lines (33 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
echo Testing Node.js installation...
echo.
echo Checking if Node.js is installed...
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [X] Node.js is NOT installed
echo.
echo Please install Node.js from: https://nodejs.org/
echo Then restart your computer.
) else (
echo [✓] Node.js is installed
for /f "tokens=*" %%i in ('node --version') do echo Version: %%i
)
echo.
echo Checking if npm is available...
where npm >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [X] npm is NOT found
echo.
echo Node.js may not be installed correctly.
echo Please reinstall Node.js from: https://nodejs.org/
) else (
echo [✓] npm is available
for /f "tokens=*" %%i in ('npm --version') do echo Version: %%i
)
echo.
echo ========================================
echo.
echo If both show [✓], you're ready to go!
echo If you see [X], follow the instructions above.
echo.
pause