[ISSUE] Cannot find module particle-cli

I was using workbench normally on Windows 10 1809 and had just successfully compiled and flashed some code to my photon, and was attempting to compile some updates when the compile failed stating "Cannot find module 'particle-cli'".

The error.log shows the following:

Error: Cannot find module 'particle-cli'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at [eval]:32:2
at ContextifyScript.Script.runInThisContext (vm.js:50:33)
at Object.runInThisContext (vm.js:139:38)
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:653:30)
at evalScript (bootstrap_node.js:479:27)

I did a reset environment within VSCode and updated the CLI in command prompt but I still can't get it working.

UPDATE: A complete CLI re-installation fixed the problem, though I kinda confused why it happened in the middle of development when I wasn't trying to update it .

Update, I’ve encountered this Issue again between running the clean and build scripts and would appreciate some insight as to why this is happening.
Going to do a complete re-installation of the CLI, again.

1 Like