0

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

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 it happened enter image description here

SZ.
  • 13
  • 5
  • Did the terminal ever work? – David Nov 02 '22 at 11:07
  • yes. I was setting up environment for angular when this happened. – SZ. Nov 02 '22 at 11:09
  • OK so please post the exact commands and or steps you did to setup this app. Add them and this info to the question with edit. With out all the details very hard to help you. – David Nov 02 '22 at 11:16

1 Answers1

1

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.

mdraevich
  • 11
  • 1