Can't perform Local Flash all of a sudden

Hello everyone. I tried to follow the above troubleshooting. Still unable to do anything with Workbench. This problem is becoming urgent now. I appreciate any help.

Everything I try, I get the error: Cannot find module ‘xtend’

Everything was working fine, I tried to re-load a project I’ve used many times, it fails. I am also unable to create a new project. I get the same error regarding the xtend module.

I am able to compile applications. I have tried compiling for 1.4.4, 1.5.2, 2.0.1 and 2.1.0. Exact same problem on all versions. Targeting Argon right now.

I have tried uninstalling Workbech and completely uninstalled VSCode and re-installed everything. Still the exact same problem.

When I try to create a new project in Workbench, it fails and I get the following in the “Output” window in VSCode.

Error in particle-cli:
 !   Cannot find module 'xtend'
Require stack:
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\settings.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\app\cli.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\index.js
- C:\Users\Kevin\AppData\Local\particle\[eval]
 !   See C:\Users\Kevin\AppData\Local\particle\error.log for more info.
Error: Command failed with exit code 1: c:\Users\Kevin\.vscode\extensions\particle.particle-vscode-core-1.13.8\src\cli\bin\windows\amd64\particle.exe project create --name testproj02 c:\Users\Kevin\Documents --no-update-check
 !   Error in particle-cli:
 !   Cannot find module 'xtend'
Require stack:
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\settings.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\app\cli.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\index.js
- C:\Users\Kevin\AppData\Local\particle\[eval]
 !   See C:\Users\Kevin\AppData\Local\particle\error.log for more info.
	at makeError (c:\Users\Kevin\.vscode\extensions\particle.particle-vscode-core-1.13.8\node_modules\execa\lib\error.js:59:11)
	at handlePromise (c:\Users\Kevin\.vscode\extensions\particle.particle-vscode-core-1.13.8\node_modules\execa\index.js:114:26)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async c:\Users\Kevin\.vscode\extensions\particle.particle-vscode-core-1.13.8\src\commands\lib\create-project.js:55:11

- - - -

When I attempt to upload a project that does compile, I get the follwing in the VS Code “Terminal” window. It is the same problem “Cannot find module ‘xtend’”

> Executing task: make -f 'C:\Users\Kevin\.particle\toolchains\buildscripts\1.10.0\Makefile' flash-user -s <


:::: PUTTING DEVICE INTO DFU MODE

 !   Error in particle-cli:
 !   Cannot find module 'xtend'
Require stack:
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\settings.js    
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\app\cli.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\index.js  
- C:\Users\Kevin\AppData\Local\particle\[eval]
 !   See C:\Users\Kevin\AppData\Local\particle\error.log for more info.

:::: FLASHING APPLICATION

Creating c:/Users/Kevin/Documents/Code/Particle/Explant_BaseStation_01/target/1.4.4/argon/platform_user_ram.ld ...
Creating c:/Users/Kevin/Documents/Code/Particle/Explant_BaseStation_01/target/1.4.4/argon/platform_user_ram.ld ...
   text    data     bss     dec     hex filename
  23928     196    3488   27612    6bdc c:/Users/Kevin/Documents/Code/Particle/Explant_BaseStation_01/target/1.4.4/argon/Explant_BaseStation_01.elf
dfu-suffix (dfu-util) 0.9

Copyright 2011-2012 Stefan Schmidt, 2013-2014 Tormod Volden
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Suffix successfully added to file
Serial device PARTICLE_SERIAL_DEV : not available
Flashing using dfu:
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

No DFU capable USB device available
make[2]: *** [../../../build/module.mk:129: program-dfu] Error 74
make[1]: *** [../build/recurse.mk:12: modules/argon/user-part] Error 2
make: *** [C:\Users\Kevin\.particle\toolchains\buildscripts\1.10.0\Makefile:86: flash-user] Error 2
The terminal process "C:\Users\Kevin\.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\Kevin\.particle\toolchains\buildscripts\1.10.0\Makefile' flash-user -s'" terminated with exit code: 2.

Press any key to close the terminal.

The note says to check the error.log file. I cleared the contents, then attempted the upload again which failed. This is what was added to error.log when it failed;

2021/05/20 21:26:38 Time since last update 1h40m41.55914s, update in block
2021/05/21 04:26:38 internal/modules/cjs/loader.js:985
  throw err;
  ^

Error: Cannot find module 'xtend'
Require stack:
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\settings.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\app\cli.js
- C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\dist\index.js
- C:\Users\Kevin\AppData\Local\particle\[eval]
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
    at Function.Module._load (internal/modules/cjs/loader.js:864:27)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\Kevin\AppData\Local\particle\node_modules\particle-cli\settings.js:31:14)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
2021/05/20 21:26:38 Time since last update 1h40m41.6574868s, update in background