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

After uninstalling the old version of nvm, I installed the latest version of node using homebrew. However, I had a problem starting my project using pm2:

pm2-dev server.js

He 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'

+5
source share
1 answer

The reason is that you modified pm2 env, try the command below to remove your pm2 env directory from your home directory.

rm -rf ~/.pm2 

Now run your pm2-dev server.js , pm2 will update env.

+13
source

Source: https://habr.com/ru/post/1247352/


All Articles