edge-impulse-cli command not found after successful npm install -g on Windows

Question/Issue: Hello, I am unable to use the edge-impulse-cli after a seemingly successful installation on a fresh Windows 10 environment. The npm install -g edge-impulse-cli command completes and reports that packages were added, but when I try to run edge-impulse-cli, I get a “Command not found” error.

Through extensive troubleshooting, we have discovered that the installation process is silently failing. It does not create the main command files (edge-impulse-cli.cmd, edge-impulse-cli.ps1) in the npm global directory, and the main script file (cli.js) is also missing from its expected location within the node_modules folder.

This issue has persisted despite a complete clean re-installation of Node.js LTS, installing all required C++ build tools, manually verifying and setting the system PATH, and disabling antivirus.

Project ID: []

Context/Use case: I am trying to set up my development environment on a Windows 10 machine to start a TinyML project and follow the official Edge Impulse tutorials. This is the very first step of setting up the command-line tools.

Summary: edge-impulse-cli command is not found after a successful npm install -g on Windows because the main executable script files are not being created.

Steps to Reproduce:

  1. On a Windows 10 machine, perform a clean install of Node.js LTS (v20.x), including the “Automatically install the necessary tools” option.
  2. After the full installation (including build tools) and a system reboot, open a new PowerShell terminal as Administrator.
  3. Run the command npm install -g edge-impulse-cli.
  4. Observe that the command completes and reports success (e.g., “added 548 packages”).
  5. Attempt to run edge-impulse-cli --version.

Expected Results: The command edge-impulse-cli --version should execute and print the version number of the tool. The files edge-impulse-cli.cmd and edge-impulse-cli.ps1 should exist in the npm global folder (C:\Users\ARPA3I\AppData\Roaming\npm). The main script cli.js should exist at ...\npm\node_modules\edge-impulse-cli\build\cli\cli.js.

Actual Results: The command edge-impulse-cli --version fails with CommandNotFoundException. Directory listings confirm that the edge-impulse-cli.cmd, .ps1, and the underlying cli.js files are all missing, while other helper command files (like edge-impulse-data-forwarder.cmd) are present.

Reproducibility:

  • [x] Always

Environment:

  • Platform: Host PC for development
  • Build Environment Details: Not applicable (issue is with CLI tool installation)
  • OS Version: Windows 10 Pro (Version 10.0.19045)
  • Edge Impulse Version (Firmware): Not applicable
  • Edge Impulse CLI Version: Trying to install the latest version via npm.
  • Project Version: Not applicable
  • Custom Blocks / Impulse Configuration: Not applicable

Logs/Attachments: I am attaching screenshots that show:

  1. The successful output of the npm install -g edge-impulse-cli command.
  2. The output of the ls command on the C:\Users\ARPA3I\AppData\Roaming\npm folder, proving the main edge-impulse-cli.cmd file is missing.
  3. The output of the ls command on the ...\node_modules\edge-impulse-cli\build\cli folder, proving the main cli.js file is also missing.



Additional Information: This issue has been thoroughly investigated. The troubleshooting steps that have already been tried and failed include:

  • Correcting PowerShell Execution Policy.
  • Manually installing Visual Studio 2022 Build Tools with the “Desktop development with C++” workload.
  • Verifying, manually editing, and confirming that the npm prefix folder is correctly set in both User and System PATH environment variables.
  • Performing multiple system reboots after changes.
  • Temporarily disabling all antivirus and real-time protection during the installation process.
  • Completely uninstalling Node.js (v22), deleting all npm and npm-cache folders from AppData, rebooting, and performing a clean install of Node.js LTS (v20).

The problem seems to be a very unusual and silent failure within npm on this specific machine environment.

Hello @jomarleite,

There is no edge-impulse-cli command, the CLI is a wrapper that contains all the other commands. See Edge Impulse CLI - Edge Impulse Documentation

It seems on your case that it was properly installed.

Best,

Louis