To solve Error: This command is not available when running the Angular CLI outside a workspace you need to open the Integrated Terminal from the root of your project and then run the ng serve command from there and your error will be solved.
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 the 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 2: Check angular.json
Just make Sure Your angular.json file has no structure error. If is there any problem in your angular.json then fixing it will resolve your error.
You need to run the ng serve command from the root of your project and your error will be solved. Hope our article helped you to solve this error also comment below which solution worked for you. Thanks.
- 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’