After you configure in the / etc / profile in the environment variable as long as the need to withdraw from all source / etc / profile to take effect.
vi /etc/profile
export NODE_HOME=/usr/local/node-v10.18.0
export NODE_PATH=$NODE_HOME/lib/node_modules
export PATH=$PATH:$NODE_HOME/bin
Solution:
Edit vi ~ / .bashrc further increase the rearmost
if [ -f /etc/profile ]; then
. /etc/profile
fi