Skip to main content

Troubleshooting and FAQ

Misconfiguration of WSL or Node.js can result in unexpected behaviors for a Node-based package like prism. Here are some common problems with their respective solutions:

Error: spawn cmd.exe ENOENT

When you run prism login from within Windows Subsystem for Linux (WSL), you might encounter Error: spawn cmd.exe ENOENT. This is an issue with the WSL distribution's PATH environment variable. Ensure that your PATH environment variable contains System32, which is where cmd.exe is located. Typically, you can run something like this:

export PATH=$PATH:/mnt/c/Windows/System32

Error: spawn xdg-open ENOENT

If you run prism login in a headless Linux environment (a Linux environment without a desktop or web browser, such as an Ubuntu server or Docker container), prism will be unable to open a GUI web browser to authenticate you. You might encounter an error that reads Error: spawn xdg-open ENOENT or Error: Exited with code 3.

You will need to authenticate on a computer with a desktop environment and web browser, then set the refresh token you receive as an environment variable on the headless server. See Headless prism Usage for CI/CD Pipelines.

prism: command not found

If you have followed the installation instructions to install prism, but then encounter prism: command not found on Linux or MacOS, or 'prism' is not recognized as an internal or external command, operable program or batch file on Windows when you run prism, you likely don't have your NodeJS PATH configured correctly. Ensure that your PATH environment variable contains the bin/ directory of your NodeJS installation.