Edge impulse cli installation error

Hello,
I am getting errors while trying to install edge impulse cli through command prompt. Can anyone help me to resolve these errors.
Thanks.

C:\Users\Admin>npm install -g edge-impulse-cli
npm WARN deprecated @zeit/dockerignore@0.0.5: “@zeit/dockerignore” is no longer maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request-promise@4.2.4: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic.
npm WARN deprecated request@2.88.0: request has been deprecated
npm ERR! code 1
npm ERR! path C:\Users\Admin\AppData\Roaming\npm\node_modules\edge-impulse-cli\node_modules@serialport\bindings
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.2.0
npm ERR! gyp info using node@16.13.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.2 found at “C:\Python310\python.exe”
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2017
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with ‘–loglevel silly’ for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the “Desktop development with C++” workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
npm ERR! gyp ERR! cwd C:\Users\Admin\AppData\Roaming\npm\node_modules\edge-impulse-cli\node_modules@serialport\bindings
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache_logs\2022-03-11T14_25_53_842Z-debug.log

Hi @Nanda019,

Have you installed the tools for native modules during nodejs setup?

You should also be able to install them from the Windows Menu -> Node.

Aurelien

1 Like

Hello @aurel
While I’m trying to install Tools for Native Modules, I’m getting the below error. I have also installed the latest version(2022) of visual studio even though I wouldn’t install the additional modules.

WARNING: ‘choco’ was found at ‘C:\ProgramData\chocolatey\bin\choco.exe’.
WARNING: An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.
Chocolatey v0.12.1
Upgrading the following packages:
python;visualstudio2019-workload-vctools
By upgrading, you accept licenses for the packages.
python v3.10.2 is the latest version available based on your source(s).
visualstudio2019-workload-vctools is not installed. Installing…
Progress: Downloading visualstudio2019-workload-vctools 1.0.1… 100%
Progress: Downloading visualstudio2019-workload-vctools 1.0.1… 100%

visualstudio2019-workload-vctools v1.0.1 [Approved]
visualstudio2019-workload-vctools package files upgrade completed. Performing other installation steps.
ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.
The upgrade of visualstudio2019-workload-vctools was NOT successful.
Error while running ‘C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1’.
See log for details.

Chocolatey upgraded 0/2 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • visualstudio2019-workload-vctools (exited -1) - Error while running ‘C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1’.
    See log for details.
    Type ENTER to exit:

Hi @Nanda019,

I ran into the same error trying to install edge-impulse-cli in PowerShell. Here’s what worked for me:

Completely uninstall Node.js (https://reactgo.com/uninstall-node-npm-from-windows/) and reinstall the latest version (I used the 16.14 graphical installer from https://nodejs.org/en/), making sure to select the “Automatically install the necessary tools” as @aurel pointed out.

From there, run the following command in a command prompt or PowerShell:

npm install -g edge-impulse-cli --force
2 Likes

Hello @shawn_edgeimpulse @aurel ,
Thank you for your reply. Sorry for the late response. I have re-installed Node.js and also installed Microsoft Visual Studio 2019 version. Now it has been installed without any errors.

2 Likes

Me also facing the same problem,
Install " Visual Studio Build Tools "
It`s work… .

2 Likes