Saturday, 21 April 2018
node_modules appears empty, you may need to run `npm install` when you run ng server --open in Angular CLI.
in: angular
In this article, We will discuss about node_modules appears empty, you may need to run `npm install` when you run ng server --open in Angular CLI.
Whenever you will create new Project in Angular CLI with "ng new Proj1", then at that time automatically it will create node_modules folder and it will automatically install all the required packages in it.
But when you run "ng server --open", it will show error like node_modules appears empty, you may need to run `npm install` because it is not getting the proper path .
So first of all, we need to Check the path, that is whether we are inside of that project or not in command prompt and then we need to type "ng server --open".
Example:-
---------
Let's Say We created a new Project "AngularApp1" under D:\MyProject\ by using "ng new AngularApp1".
But while running the project, i am inside D:\MyProject\ in command prompt and running with ng server --open then at that time in MyProject it is trying to find out node_modules folder but which is not present. Rather than it is present under "D:\MyProject\AngularApp1" folder.
So Now, In Command prompt we need to switch to "D:\MyProject\AngularApp1" and type ng server --open and which will work fine.
RELATED POSTS

Difference between Angular and Angular JS?
In this article, We will discuss about What is the difference between An ...

What are the node packages required for Angular 2 app development?
In this article, We will discuss about What are the node packages requir ...

What are the Steps required to Create an angular 2 application?
In this article, We will discuss about What are the Steps re quired to C ...
-
This issue is Completely related to EntityFramework and this issue arises whenever you have installed EntityFramework in one project at th...
-
This is generally a Common Problem or the error could be like this, To Resolve this error, One Small Solution is Exists which is as b...
-
In this article, We will discuss What is the above Error and How to resolve this Error. Whenever, We are Restoring our database into A...
0 comments:
Post a Comment