pm2 is loading the older version of node js code even after pm2 kill command is executed

Viewed 660

I have updated my source code in the server and I'm trying to run the latest code.

I'm using AWS Lightsail

The server is running on Ubuntu 16.04

Here is what I have tried

Step1:
pm2 kill 

Step 2:
NODE_ENV=production pm2 start server.js

But the older version of the code is running. How do I clear caches?

I have seen other answers and tried reload as well. Even that didn't work.

How do I solve this?

1 Answers

Finally, I figured out that the problem was with Angular files replacement.

Deleting the dist folder and pasting the new dist folder from the development code was creating problems.

So, I had to just paste and replace the files which had changes.

Related