Description
pm2 serve returns HTTP 403 Forbidden for all static files on Windows.
This regression was introduced in v7.0.0 and is NOT fixed in v7.0.1.
Downgrading to v6.0.14 immediately resolves the issue.
Environment
- OS: Windows 10 (x64)
- PM2: 7.0.0 and 7.0.1 (both affected)
- Node.js: Tested with v14.20.1 and v22.19.0 — same result on both
- Scale: Confirmed on multiple machines across different store locations
Steps to Reproduce
- Install PM2 7.x on Windows:
npm install pm2@7 -g
- Run:
pm2 serve <build-folder> --name front --port XXXX
- Open browser at
http://localhost:XXXX
Expected Behavior
Static files (JS, CSS) are served correctly with HTTP 200.
Actual Behavior
All requests to static files return HTTP 403 Forbidden:
GET http://localhost:XXXX/static/js/main.chunk.js → 403 Forbidden
GET http://localhost:XXXX/static/css/main.chunk.css → 403 Forbidden
Even curl -I http://localhost:XXXX/static/js/main.chunk.js from the
server itself returns 403.
Root Cause Suspicion
The v7.0.0 changelog mentions:
Replace url.parse() with native URL constructor (Serve, Utility, CliAuth)
This rewrite of the Serve module likely introduced a path handling
regression specific to Windows (backslash vs forward slash).
Workaround
Downgrade to v6.0.14:
npm install pm2@6.0.14 -g
This immediately resolves the 403 errors on all affected machines.
Description
pm2 servereturns HTTP 403 Forbidden for all static files on Windows.This regression was introduced in v7.0.0 and is NOT fixed in v7.0.1.
Downgrading to v6.0.14 immediately resolves the issue.
Environment
Steps to Reproduce
npm install pm2@7 -gpm2 serve <build-folder> --name front --port XXXXhttp://localhost:XXXXExpected Behavior
Static files (JS, CSS) are served correctly with HTTP 200.
Actual Behavior
All requests to static files return
HTTP 403 Forbidden:GET http://localhost:XXXX/static/js/main.chunk.js → 403 Forbidden
GET http://localhost:XXXX/static/css/main.chunk.css → 403 Forbidden
Even
curl -I http://localhost:XXXX/static/js/main.chunk.jsfrom theserver itself returns 403.
Root Cause Suspicion
The v7.0.0 changelog mentions:
This rewrite of the
Servemodule likely introduced a path handlingregression specific to Windows (backslash vs forward slash).
Workaround
Downgrade to v6.0.14:
npm install pm2@6.0.14 -g
This immediately resolves the 403 errors on all affected machines.