I have a strange and new problem as of the other day, where CLI or the workbench had been not giving me any issues beforehand.
None of my projects are allowing me to Flash any code, nor is my CLI allowing me to reset my Particle Photon device. Whether my Photon is plugged in or not, when I run ‘Particle usb dfu’ I get only the following result:
! The `particle-usb` dependency is missing or invalid.
! Please reinstall: https://docs.particle.io/tutorials/developer-tools/cli/#installing
Cannot find module 'usb'
The link is to Particle’s page on installing CLI, so I figure that there is something wrong with the CLI. However, as much as I would like to uninstall and reinstall right away, I’m not exactly sure how to uninstall the CLI and can’t seem to find it through a few Google searches.
Also, even though compiling still works for me, I get the following error when I try flashing the code:
Cannot find module 'usb'
make: *** [C:\Users\jhdil\.particle\toolchains\buildscripts\1.6.1\Makefile:23: dfu] Error 1
The terminal process terminated with exit code: 2
Press any key to close the terminal.
The following is my audit environment:
*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245
{
"username": "jhdillenb@gmail.com",
"workspace": {
"name": "serial_stuff",
"isWorkspace": false,
"folders": [
{
"location": "c:\\Users\\jhdil\\OneDrive\\Desktop\\serial_stuff",
"hasValidPath": true,
"settings": {
"firmwareName": "deviceOS",
"firmwareVersion": "1.4.0-rc.1",
"targetDevice": "",
"targetPlatform": "photon",
"compileButtonAction": "localAppDeviceOS",
"flashButtonAction": "localAppDeviceOS",
"disableWelcomeScreen": true,
"disableLocalCompilerDirtyCheck": false,
"enableVerboseLocalCompilerLogging": false
},
"files": [
".vscode",
".vscode\\launch.json",
".vscode\\settings.json",
"project.properties",
"README.md",
"src",
"src\\serial_stuff.cpp",
"src\\serial_stuff.ino"
]
}
]
},
"cli": {
"binpath": "c:\\Users\\jhdil\\.vscode\\extensions\\particle.particle-vscode-core-1.5.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
"ok": true,
"version": "1.44.0",
"installed": 1567213658115
},
"localCompiler": {
"ok": true,
"dependencies": [
{
"id": "deviceOS@1.4.0-rc.1",
"ok": true
},
{
"id": "gcc-arm@5.3.1",
"ok": true
},
{
"id": "buildtools@1.1.0",
"ok": true
},
{
"id": "buildscripts@1.6.1",
"ok": true
},
{
"id": "openocd@0.11.1-adhoc6ea4372.0",
"ok": true
},
{
"id": "deviceOS@1.3.0-rc.1",
"ok": true
},
{
"id": "deviceOS@1.2.1-rc.2",
"ok": true
},
{
"id": "deviceOS@1.0.1",
"ok": true
}
]
},
"platform": {
"os": "windows",
"type": "Windows_NT",
"release": "10.0.17134",
"arch": "x64",
"path": {
"key": "Path",
"value": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Git\\cmd;C:\\Users\\jhdil\\OneDrive\\Desktop\\Old_COD_C++_Stuff\\mingw32\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files\\MySQL\\MySQL Shell 8.0\\bin\\;C:\\Users\\jhdil\\Anaconda3;C:\\Users\\jhdil\\Anaconda3\\Scripts;C:\\Users\\jhdil\\Anaconda3\\condabin;C:\\Users\\jhdil\\Anaconda3\\libs;C:\\Users\\jhdil\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\jhdil\\AppData\\Roaming\\npm"
},
"homeDir": "C:\\Users\\jhdil",
"particleDir": "C:\\Users\\jhdil\\.particle",
"localCompilerToolchainDir": "C:\\Users\\jhdil\\.particle\\toolchains"
},
"env": {
"ALLUSERSPROFILE": "C:\\ProgramData",
"AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
"APPDATA": "C:\\Users\\jhdil\\AppData\\Roaming",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"CommonProgramFiles": "C:\\Program Files\\Common Files",
"CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
"CommonProgramW6432": "C:\\Program Files\\Common Files",
"COMPUTERNAME": "DESKTOP-IVRLSBC",
"ComSpec": "C:\\Windows\\system32\\cmd.exe",
"DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
"ELECTRON_RUN_AS_NODE": "1",
"FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
"FPS_BROWSER_USER_PROFILE_STRING": "Default",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\jhdil",
"LOCALAPPDATA": "C:\\Users\\jhdil\\AppData\\Local",
"LOGONSERVER": "\\\\DESKTOP-IVRLSBC",
"NUMBER_OF_PROCESSORS": "8",
"OneDrive": "C:\\Users\\jhdil\\OneDrive",
"OneDriveConsumer": "C:\\Users\\jhdil\\OneDrive",
"OS": "Windows_NT",
"Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Git\\cmd;C:\\Users\\jhdil\\OneDrive\\Desktop\\Old_COD_C++_Stuff\\mingw32\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files\\MySQL\\MySQL Shell 8.0\\bin\\;C:\\Users\\jhdil\\Anaconda3;C:\\Users\\jhdil\\Anaconda3\\Scripts;C:\\Users\\jhdil\\Anaconda3\\condabin;C:\\Users\\jhdil\\Anaconda3\\libs;C:\\Users\\jhdil\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\jhdil\\AppData\\Roaming\\npm",
"PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
"PIPE_LOGGING": "true",
"PROCESSOR_ARCHITECTURE": "AMD64",
"PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 142 Stepping 10, GenuineIntel",
"PROCESSOR_LEVEL": "6",
"PROCESSOR_REVISION": "8e0a",
"ProgramData": "C:\\ProgramData",
"ProgramFiles": "C:\\Program Files",
"ProgramFiles(x86)": "C:\\Program Files (x86)",
"ProgramW6432": "C:\\Program Files",
"PSModulePath": "%ProgramFiles%\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
"PUBLIC": "C:\\Users\\Public",
"SESSIONNAME": "Console",
"SystemDrive": "C:",
"SystemRoot": "C:\\Windows",
"TEMP": "C:\\Users\\jhdil\\AppData\\Local\\Temp",
"TMP": "C:\\Users\\jhdil\\AppData\\Local\\Temp",
"USERDOMAIN": "DESKTOP-IVRLSBC",
"USERDOMAIN_ROAMINGPROFILE": "DESKTOP-IVRLSBC",
"USERNAME": "jhdil",
"USERPROFILE": "C:\\Users\\jhdil",
"VBOX_MSI_INSTALL_PATH": "C:\\Program Files\\Oracle\\VirtualBox\\",
"VERBOSE_LOGGING": "true",
"VSCODE_CWD": "C:\\Windows\\system32",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_IPC_HOOK": "\\\\.\\pipe\\a629cbdb9f1fda57ff5d021a25098436-1.37.1-main-sock",
"VSCODE_IPC_HOOK_EXTHOST": "\\\\.\\pipe\\vscode-ipc-85220e66-a717-48ad-8388-9b5680e52634-sock",
"VSCODE_LOGS": "C:\\Users\\jhdil\\AppData\\Roaming\\Code\\logs\\20190830T205239",
"VSCODE_LOG_STACK": "false",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_NODE_CACHED_DATA_DIR": "C:\\Users\\jhdil\\AppData\\Roaming\\Code\\CachedData\\f06011ac164ae4dc8e753a3fe7f9549844d15e35",
"VSCODE_PID": "1700",
"VSCODE_PREVENT_FOREIGN_INSPECT": "true",
"windir": "C:\\Windows"
},
"versions": {
"http_parser": "2.8.0",
"node": "10.11.0",
"v8": "6.9.427.31-electron.0",
"uv": "1.23.0",
"zlib": "1.2.11",
"ares": "1.14.0",
"modules": "69",
"nghttp2": "1.33.0",
"napi": "3",
"openssl": "1.1.0",
"icu": "62.2",
"unicode": "11.0",
"cldr": "33.1",
"tz": "2019a"
},
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "c:\\Users\\jhdil\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
"machineId": "11d4b23c0da177230f94e37c0615185bb81b8910cf43325b1412c93cf1aee13e",
"sessionId": "32edb89c-1e00-41da-a89f-ee4e114bc41c1567268206554",
"version": "1.37.1"
},
"extensions": [
{
"id": "ms-vscode.node-debug",
"version": "1.35.3"
},
{
"id": "ms-vscode.node-debug2",
"version": "1.33.0"
},
{
"id": "ms-vscode.references-view",
"version": "0.0.29"
},
{
"id": "austin.code-gnu-global",
"version": "0.2.2"
},
{
"id": "marus25.cortex-debug",
"version": "0.3.1"
},
{
"id": "ms-python.anaconda-extension-pack",
"version": "1.0.1"
},
{
"id": "ms-python.python",
"version": "2019.8.30787"
},
{
"id": "ms-vscode.cpptools",
"version": "0.25.1"
},
{
"id": "ms-vscode.csharp",
"version": "1.21.1"
},
{
"id": "particle.particle-vscode-theme",
"version": "1.5.2"
},
{
"id": "particle.particle-vscode-snippets",
"version": "1.5.2"
},
{
"id": "particle.particle-vscode-core",
"version": "1.5.2"
},
{
"id": "particle.particle-vscode-pack",
"version": "1.5.2"
}
]
}
*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245
Should I, and how do I, uninstall and reinstall CLI? Or is there a different step I’m supposed to take to get my workbench flashing to and reseting my Photon again?