I have no idea what I have done or did. Please help.
This looks like you are using Windows.
With Windows you should not use
npm to install CLI but the Windows Installer
While in PS you can also try hopping into
cmd and try from there again.
From there you can run
where particle to see where your system is looking for CLI (providing it knows of it at all).
Everything was working fine one moment and the next I get the above. I programmed all morning on the exact same file and then all of a sudden got this error. I don’t know what could have happened. Do I need to reinstall particle?
In that case it shouldn’t be necessary to reinstall.
Have you tried logging out and in again?
Have you tried running it from outside VS Code?
I went to
C:\Users\username\AppData\Local\particle when I type particle I get "welcome to the command line interface! Version 3.0.0
I don’t know how to logout of VS.
I typed in the open serial command in the CLI and it opened a serial port and works fine. I had no idea this was even a thing. It seems like somehow the particle path within VS was broken. Is there somewhere I can point it to the correct place? Thanks for the help.
I logged out and back in via the command line. No change in VS.
I’m not that much of an expert on the inner workings of VS Code, so I’d have to defer to @m_m to get CLI back up in the terminal.
try running the
Particle: Launch CLI command in Workbench and then re-running your
particle serial command in the terminal instance that launches.
if you are still seeing unexpected behavior, these troubleshooting steps might be helpful:
Now I am getting this error
! Error in particle-cli: ! Cannot find module 'lodash' Require stack: - C:\Users\thead\AppData\Local\particle\node_modules\particle-cli\dist\lib\has-supported-node.js - C:\Users\thead\AppData\Local\particle\node_modules\particle-cli\dist\index.js - C:\Users\thead\AppData\Local\particle\[eval] ! See C:\Users\thead\AppData\Local\particle\error.log for more info. make: *** [C:\Users\thead\.particle\toolchains\buildscripts\1.10.0\Makefile:37: z:/Personal/Electronics/particle/fram_i2c_display_bme280_9dof/src/fram_i2c_display_bme280_9dof.cpp] Error 1 The terminal process "C:\Users\thead\.particle\toolchains\buildtools\1.1.1\bin\bash.exe '-c', 'make -f 'C:\Users\thead\.particle\toolchains\buildscripts\1.10.0\Makefile' compile-user -s'" terminated with exit code: 2. Press any key to close the terminal.
Error: Cannot find module 'lodash' Require stack: - C:\Users\thead\AppData\Local\particle\node_modules\particle-cli\dist\lib\has-supported-node.js - C:\Users\thead\AppData\Local\particle\node_modules\particle-cli\dist\index.js - C:\Users\thead\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\thead\AppData\Local\particle\node_modules\particle-cli\dist\lib\has-supported-node.js:3:11) 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) 2022/01/26 15:26:39 Time since last update 1m43.1918816s, update in background
try resetting your installation using these steps
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.