Unable to confirm the version of Angular

I am currently using node version 10.14.1 and npm version 6.4.1 with angular version 7.0.3 installed. However, when I try to check the angular version by running the ng --version command, I encounter an error message in the command prompt.

C:\Users\indhumadhi.k>ng v ENOENT: no such file or directory, scandir 'C:\Users\indhumadhi.k\node_modules' Error: ENOENT: no such file or directory, scandir 'C:\Users\indhumadhi.k\node_modules' at Object.readdirSync (fs.js:783:3) at VersionCommand.run (C:\Users\indhumadhi.k\AppData\Roaming\npm\node_modules@angular\cli\commands\version-impl.js:48:41) at VersionCommand.validateAndRun (C:\Users\indhumadhi.k\AppData\Roaming\npm\node_modules@angular\cli\models\command.js:123:31) at process._tickCallback (internal/process/next_tick.js:68:7) at Function.Module.runMain (internal/modules/cjs/loader.js:744:11) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

Answer №1

If you want to see which version of Angular is currently installed, make sure to use the command ng version instead of ng --version

Answer №2

It appears that the ng cli has not been installed globally.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Show a dropdown menu based on a certain condition in Angular

Is there a way to conditionally display select options like this? <select id="updateType" class="form-control" formControlName="updateType"> <option value="personalDetails">Personal</option> <option value="addressD ...

The "library" is encountering errors due to missing dependencies, specifically @angular/material/form-field

I've been working with a shared component library project that has been running smoothly for a while now. Recently, I decided to replace some of the custom components with Angular Material components. However, after adding NgMat to the library project ...

Gulp ceased to function following the upgrade to node.js version 4.1

Recently, I made the leap from node 0.12.x to version 4.1.0. However, I encountered an issue after updating - my beloved gulp stopped working. A puzzling error message popped up in the console upon attempting to run gulp: module.js:338 throw err; ^ Error ...

What is the best way to ensure a specific row remains at the bottom of an Angular table with Material when sorting?

My data table contains a list of items with a row at the end showing the totals. | name | value1 | value2 | --------------------------- | Emily | 3 | 5 | | Finn | 4 | 6 | | Grace | 1 | 3 | | TOTAL | 8 | 14 | I&apos ...

Is it necessary to unsubscribe from multiple switchmaps?

Consider the following scenario: Should I implement an unsubscribe in each instance of switchMap? And is it necessary to include a takeUntil after every switchMap operation? this.sharedSrv.postDetail.pipe( switchMap(post => { if (post) { th ...

Establishing a distinct registry for a particular package within the .npmrc configuration file

Today, I encountered a new challenge that I've never faced before. I am currently in need of having private node packages published in both a private and public repository under the same @scope. The packages on npmjs.org are stable and open to the pu ...

Is there a way to determine the distance in miles and feet between various sets of latitude and longitude coordinates?

I am working with an array of latitude and longitude coordinates and I am looking to use JavaScript or Typescript to calculate the distance in miles and feet between these points. const latsLngs = [ { lat: 40.78340415946297, lng: -73.971427388 ...

How to efficiently transfer data between Node and Angular 7 using Electron

After setting up an Angular 7 application running on http://localhost:4200, I developed a Node JS application responsible for authenticating users on Facebook, accessible at http://localhost:3000. The callback redirection functions correctly within the No ...

What is the best way to incorporate HTML entities into my Angular2 project?

I am currently using Angular-CLI to develop a straightforward style guide application. Unfortunately, I have encountered some issues when including preformatted HTML markup that contains HTML entities: Uncaught Error: Template parse errors: Unknown entit ...

Upgrading to Angular 14 has caused issues with component testing that involves injecting MAT_DIALOG_DATA

After upgrading Angular from 14.1.1 to 14.2.10 and Material from 14.1.1 to 14.2.7, a peculiar issue arose when running tests with the default Karma runner. I am at a loss as to what could have caused this problem, so any advice would be appreciated. The u ...

What is the process for automatically initiating a service when importing a module in Angular?

I am curious about how I can automatically run a service within a module upon importing it, without the need for manual service injection and execution. This functionality is similar to how the RouterModule operates. @NgModule({ imports: [ Browser ...

What could be the reason for npm requesting a password?

Currently, I have a CentOS6.4 virtual box set up on Windows 8 using vagrant. In an attempt to install my project's dependencies, including proto, I ran into an unexpected issue. When running npm install proto, it asked me for a password. Why is npm su ...

Having trouble with getting "npm install express" to work properly

After entering the command "sudo npm install -g express-generator," I encountered errors. I searched for solutions on Stackoverflow but none of them worked for me. Some of the methods I attempted include: "sudo chown -R username ~/.npm" and "npm cache c ...

Navigate to the previous page

What is the best way to navigate back to the last page in Angular 2? Can it be done like this? this._router.navigate(LASTPAGE); For instance, if page C includes a Go Back button, From Page A to Page C, clicking it will take you back to Page A. Fro ...

Issue Installing Npm Package (detected 23 security vulnerabilities)

My attempt to install the package resulted in an error message. How can I resolve this issue? ...

I'm having trouble with Material Design Slide Toggle as it lacks event.StopPropagation functionality. Any suggestions on what alternative I

When working with the Slide Toggle in Material Design, I noticed that it does not have a stopPropagation event. This is because the "MdSlideToggle.prototype._onChangeEvent" already includes a call to stopPropagation. So, what should be used instead? <m ...

Creating custom components in AngularJS 2 allows you to define methods unique to each component. Want to learn

I created my component (A) by combining multiple html elements, but I have two questions. How do I define methods (such as get, etc.) on my component? I have tried @Output, @ViewChild, etc. but they are not working. I am looking for an alternative way ...

Utilize the precise release of the library from the NPM repository

We have integrated the following library as dependencies in our project: https://github.com/rlidwka/sinopia Within this library, they utilize express in their package.json file: https://github.com/rlidwka/sinopia/blob/master/package.yaml dependencies: ...

Discover the simple steps to include row numbers or serial numbers in an angular2 datagrid

Currently, I am utilizing angular2 -datatable. Unfortunately, I am facing an issue where the correct row numbers are not being displayed in their corresponding rows. Whenever a user moves to the next page using the paginator, the datatable starts countin ...

How does including npm in the devDependencies impact the project?

I came across a project that includes the following in its package.json file under "devDependencies": "npm": "3.8.3", Since nodejs already includes npm, what impact does this have when running npm install? ...