Skip to content

Cant install on windows #102

Open
Open
@Mxater

Description

Description

I tried to run setup on a windows virtualmachine, but not work. I using FNM for node manager version.

Steps to Reproduce

  1. npm run configure
  2. npm run configure-policy
  3. npm run setup

Error:

> pm2-installer@3.4.3 setup
> node ./src/tools/script-for-os.js


> pm2-installer@3.4.3 setup:windows
> PowerShell -NoProfile -ExecutionPolicy Bypass src\windows\setup.ps1

=== Setup ===
=== Checking Script Privileges ===
Script is running as administrator.
=== Checking Script Privileges Complete ===
=== Checking npm Configuration ===
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\check-configuration.ps1:3 char:14
+ $prefix = "$(npm config --global get prefix)"
+              ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\check-configuration.ps1:4 char:13
+ $cache = "$(npm config --global get cache)"
+             ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Global npm prefix location appears valid:
Global npm cache location appears valid:
=== Checking npm Configuration Complete ===
=== Install Packages ===
node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:5 char:19
+ $pm2_package = "$(node src/tools/dependencies/echo.js pm2)"
+                   ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:6 char:29
+ $pm2_logrotate_package = "$(node src/tools/dependencies/echo.js @jess ...
+                             ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:7 char:28
+ $node_windows_package = "$(node src/tools/dependencies/echo.js node-w ...
+                            ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:15 char:1
+ node src\bundle-info\current.js
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Using:



node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:23 char:1
+ node src\tools\npm-online.js
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (node:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Cannot connect to the npm registry, and no offline bundle was found. Attempting install anyway..
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:136 char:3
+   npm install --global --loglevel=error --no-audit --no-fund $pm2_pac ...
+   ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:137 char:3
+   npm install --global --loglevel=error --no-audit --no-fund $pm2_log ...
+   ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:138 char:3
+   npm install --global --loglevel=error --no-audit --no-fund $node_wi ...
+   ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Linking node-windows..
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:141 char:3
+   npm link node-windows --loglevel=error --no-fund --no-audit --produ ...
+   ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-packages.ps1:145 char:19
+ $script_path = "$(npm config get prefix)\pm2.ps1"
+                   ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

=== Install Packages Complete: took 0 seconds ===
=== Creating Service ===
Determining pm2 installation directory..
npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\app\NodeJs\pm2\src\windows\setup-service.ps1:285 char:29
+ $PM2_INSTALL_DIRECTORY = "$(npm config get prefix --global)\node_modu ...
+                             ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

Environment

npm run info

pm2-installer@3.4.3 info
node ./src/bundle-info/current.js

Running on: 1/22/2025, pm2-installer 3.4.3 with node v23.6.0 and npm 11.0.0 on win32-10.0.20348.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions