Whenever I am trying to run ng server command in my terminal I am facing the following Error: This command is not available when running the Angular CLI outside a workspace in Angular We will learn about All Possible Solutions So Lets Get Start with This Article.
How This Error: This command is not available when running the Angular CLI outside a workspace Occurs?
Whenever I am trying to run ng server command in my terminal I am facing the following error:
Error: This command is not available when running the Angular CLI outside a workspace
So here I am writing all the possible solutions that I have tried to resolve this error.
How To Solve this Error: This command is not available when running the Angular CLI outside a workspace Occurs?
- How To Solve this Error: This command is not available when running the Angular CLI outside a workspace Occurs?
To Solve this Error: This command is not available when running the Angular CLI outside a workspace Occurs Here in this Case You might not use your workspace terminal and that's why you are facing this error. But You just need to Open Your terminal with your workspace. Just follow below step and your error will be solved. First of all Right-click on your Project Name in VS Code left sidebar. And You'll See Something like the below Interphase. And Then Click on Open in Integrated Terminal and then You can run ng serve command without any issue. Hopefully, Your error might be solved now, Thanks.
- Error: This command is not available when running the Angular CLI outside a workspace
To Solve this Error: This command is not available when running the Angular CLI outside a workspace Occurs Here in this Case You might not use your workspace terminal and that's why you are facing this error. But You just need to Open Your terminal with your workspace. Just follow below step and your error will be solved. First of all Right-click on your Project Name in VS Code left sidebar. And You'll See Something like the below Interphase. And Then Click on Open in Integrated Terminal and then You can run ng serve command without any issue. Hopefully, Your error might be solved now, Thanks.
Solution 1: Open Your terminal with your workspace
Here in this Case You might not use your workspace terminal and that’s why you are facing this error. But You just need to Open Your terminal with your workspace. Just follow below step and your error will be solved.
First of all Right-click on your Project Name in VS Code left sidebar. And You’ll See Something like the below Interphase.

And Then Click on Open in Integrated Terminal and then You can run ng serve command without any issue. Hopefully, Your error might be solved now, Thanks.
Conclusion
It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- TypeError: cli.isMultipleCompiler is not a function
- Cannot resolve No versions available for org.osgi.service:org.osgi.service.prefs:jar:[1.1.0,1.2.0) within specified range
- ImportError: cannot import name ‘dtensor’ from ‘tensorflow.compat.v2.experimental’
- Minimum supported Gradle version is 7.3.3. Current version is 7.2
- cannot import name ‘pad_sequences’ from ‘keras.preprocessing.sequence’
worked for me, thanks
It’s my Pleasure to Help You shruti. Thank You For Your Valuable words.