''pm2' is not recognized as an internal command with volta install

453 Views Asked by At

I install volta as node version handler and when I run pm2 status/start/stop in PowerShell or cmd, there is 'pm2' is not recognized as an internal command' error.

I know that I should install pm2 as global but run npm i -g pm2 it is not working and have same error. Anybody has any idea?

1

There are 1 best solutions below

0
On

by this answer of Volta and global npm package I just run volta install pm2 instead of npm i -g pm2 and set Volta/bin in environment variable of windows. in Global installs done right said:

By running volta install mocha, you let Volta know that you want mocha to be available everywhere in your terminal