jessety / pm2-installer

Install PM2 offline as a service on Windows or Linux. Mostly designed for Windows.
MIT License
495 stars 50 forks source link

No permission to Set-Permissions #83

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

Description

It stop here and prompts the error as below:

The 'Save-Module' command was found in the module 'PowerShellGet', but the module could not be loaded.

Solution in https://stackoverflow.com/questions/40987109/the-save-module-command-was-found-in-the-module-powershellget-but-the-modul is not working.

But manually execute scripts in

https://github.com/jessety/pm2-installer/blob/e5315225c26ef4d77b29ed65d4ccc33fc75691c3/src/windows/setup-service.ps1#L36-L48

And commentout these lines in the code, works.

Steps to Reproduce

  1. in win11
  2. install pm2 using pnpm
  3. clone and configue and setup in this repo

Environment

Running on: 2023/5/18, pm2-installer 3.4.3 with node v20.2.0 and npm 9.6.6 on win32-10.0.22621.

punowo commented 1 year ago

I'm not sure but this might be dependent on the version of powershell. Are you by chance using 7+ ?

linonetwo commented 1 year ago

Yes, I was using latest powershell.

But I'm not using pm2 now...because my service requires input from cli, pm2 make it impossible to interact with it.