Not able to install forge cli from Windows power shell

npm error path C:\Users\Ghata Singhal\AppData\Roaming\npm\node_modules@forge\cli\node_modules\cloudflared
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node scripts/postinstall.mjs && node lib/cloudflared.js -v
npm error Installed cloudflared to C:\Users\Ghata Singhal\AppData\Roaming\npm\node_modules@forge\cli\node_modules\cloudflared\bin\cloudflared.exe
npm error ‘C:\Users\Ghata’ is not recognized as an internal or external command,
npm error operable program or batch file.

npm error A complete log of this run can be found in: C:\Users\Ghata Singhal\AppData\Local\npm-cache_logs\2024-06-12T18_19_32_476Z-debug-0.log

Have you checked that your $env:PATH is correct?

Welcome to the Atlassian developer community @GhataSinghal,

The error seems to indicate a problem with Node installed into your home directory with a space in the name. It seems like a known problem but one that isn’t going to be fixed. Although written about a slightly different command and error message, this blog seems to have good instructions on how to fix:

1 Like