Not detecting colorbar

Hi, whenever I try to run a GMT command with colorbar, its giving me this out put. Here is my code:

#!/usr/bin/env bash

#export GMT_SESSION_NAME=$$

#set GMT_SESSION_NAME=2000

gmt makecpt -Cbathy -T-1000/0/100 -Z > def.cpt

gmt begin meshTry

gmt xyz2grd updated.txt -GupdatedN.nc -R-90/-50/5/40/ -I1m 

gmt grdimage updatedN.nc -JX20c -B -Cdef.cpt  -pdf testgmtbash 

gmt colorbar -Cdef.cpt 

gmt end showS

Here is the error:

gmt.exe [ERROR]: Shared GMT module not found: colorbar

ERROR: No module named colorbar was found. This could mean one of four cases:

  1. There actually is no such module; please check your spelling.
  2. You used a modern mode module name while running in GMT classic mode.
  3. Module exists in the GMT supplemental library, but the library could not be found.
  4. Module exists in a GMT custom library, but none was specified via GMT_CUSTOM_LIBS.
    Shared libraries must be in standard system paths or set via environmental parameter %%PATH%%.

gmt.exe [ERROR]: Not available in classic mode

what do I do?