wyb
wyb

Reputation: 123

Error: Cannot find module '/Users/wyb/.nvm/versions/io.js/v3.0.0/lib/node_modules/pm2/lib/ProcessContainerFork.js'

After removing the older version of nvm, i installed the latest version of node by using homebrew. However, i got some problem starting my project using pm2:

pm2-dev server.js

It loaded the path including nvm. Here is the log:

Error: Cannot find module '/Users/wyb/.nvm/versions/io.js/v3.0.0/lib/node_modules/pm2/lib/ProcessContainerFork.js'

Upvotes: 12

Views: 9578

Answers (2)

shivam dwivedi
shivam dwivedi

Reputation: 120

@gongzili456

Answer is Good For Only if you host/deployed only 1 website in server

rm -rf ~/.pm2

but if you did host multiple website on same server then please Don't Use Above Command

Otherwise all website will be down and you can easily view

You Can Use This, if You did host multiple website in single server

pm2 update

Upvotes: 5

gongzili456
gongzili456

Reputation: 596

The reason is you pm2 env is modified, please try run command below to delete your pm2 env dir from your home dir.

rm -rf ~/.pm2

Now rerun your pm2-dev server.js, pm2 will refresh env.

Upvotes: 48

Related Questions