Cannot be used properly after the NPM module is installed globally in MAC. Export PATH is required.

recently discovered a strange phenomenon while learning to use NPM,.
I can"t use node modules clients babel, live-server in terminal after they are installed globally. Terminal returns a prompt for-bash: babel: command not found.

I can"t fix this problem until I type export PATH=$PATH:/Users/username/npm-global/bin. But when I open the second window with command+t, I need to type export PATH=$PATH:/Users/username/npm-global/bin again to start using these globally installed modules.

does anyone know what the reason is?

May.06,2021

you opened a different window path. This problem should not exist if it is installed globally

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36171-e536.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36171-e536.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?