Working on a new install on a work computer. Unfortunately, I can't log in, can't create a project, and can't update the CLI. Every time I get the following error: Error: EPERM: operation not permitted, mkdir '.particle'. When I run audit environment, I get the error there under the cli version tag. I tried running VSCode as an admin, but that just sets it up for the admin user, which is separate. Any thoughts? This is Win 10, latest VSCode, latest Workbench extension.
Is there a .particle directory at the top level of your home directory (probably C:\Users\yourusername)? If there is, you might want to try renaming it so a new one can be created.
If there isn't one, you could try creating an empty directory and see if that works.
Thanks for the quick reply. That directory did exist, so I renamed it (.particle2) and tried to login again. Same issue...
Error: EPERM: operation not permitted, mkdir '.particle'
at makeError (c:\Users\psherk.vscode\extensions\particle.particle-vscode-core-1.16.30\node_modules\execa\lib\error.js:59:11)
at handlePromise (c:\Users\psherk.vscode\extensions\particle.particle-vscode-core-1.16.30\node_modules\execa\index.js:114:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async LoginCommand.loginWithUsername (c:\Users\psherk.vscode\extensions\particle.particle-vscode-core-1.16.30\src\commands\lib\login.js:81:17)
at async LoginCommand.exec (c:\Users\psherk.vscode\extensions\particle.particle-vscode-core-1.16.30\src\commands\command.js:39:13)
at async Y0.h (file:///c:/Users/psherk/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32825)
@rickkas7 To expand on this further, when I run the Particle CLI in a Windows command prompt, it works, allows me to login, all that stuff. Not sure the difference inside VSCode...
Correction, it works when I'm on the H drive (my network user drive), but not when I'm on the C drive. Which is interesting as I have full permissions to my local user folder on the C: drive. Anyway, I can run the CLI inside VSCode and run commands there after I switch to the H: drive, but that doesn't help with running Particle commands through VSCode. I guess I have to redirect something inside VSCode?
I moved the project over to the external drive, and it seems to be happy. Guess that will work for now... Must be something odd with local permissioning.