2

When I open terminal, I see no prompt. Pressing any button does not help. I have seen this question, but no solution works as I can't enter commands at all. Terminal is just there, doing nothing.

terminal having no prompt

I installed node and basic commands to install angular-cli. I setup my project and ran npm install. ng serve was the last command when the problem happened.

What can I do to fix my terminal?

SZ.
  • 33

2 Answers2

2

Faced the same issue on Ubuntu 20.04.4 LTS after installing ng-common package and doing some npm build/ install/ run commands.

The part of my .bash_history file before I've faced the issue:

npm run build
ng
sudo apt install ng-common
npm run build
ls
sudo npm run build
npm run build
npm start
npm run build .
npm install
npm start
npm run build
npm start

As I discovered, the issue lied in .bashrc file that had the following lines:

# Load Angular CLI autocompletion.
source <(ng completion script)

It turned out that I've enabled CLI autocompletion during npm run build and .bashrc was updated by ng-common package appropriately. Remove the line from .bashrc to get your terminal working.

P.S. In order to edit .bashrc file you may use either root shell in safe mode or you may edit the file using text editor in GUI.

1

Follow these steps:

  1. Go to your Home directory.

  2. Press Ctrl+H.

  3. Edit the .bashrc file and delete (or comment out using # in front of them) these lines:

    # Load Angular CLI autocompletion.
    source <(ng completion script)
    

Good luck!