. Advertisement .
..3..
. Advertisement .
..4..
Today when I am running the ng serve
command, I get the ”node_modules appears empty, you may need to run `npm install`” error.
$ ng serve
node_modules appears empty, you may need to run `npm install`
I’m confused because I don’t have any experience with this problem. Everyone’s help will be very appreciated to me. Why this error happens and how to fix? I look forward to receiving your answer.
Thanks!
The cause: This error occurs when the development server cannot operate due to missing packages in the
node_modules/ folder
Solution: To fix this error, make sure you have the
node_modules/ folder
created by thenpm install
command.After using the
ng new
orember new
commands, you might need to explicitly runnpm install
for older versions of Angular or Ember.Using the
cd
command, you can change the active directory of your command line to the folder where you develop the application.