I recently had problems reinstalling particle-cli (failure at serialport) but then I found these posts:
and
I followed the suggestion to do the npm install from the Visual Studio Command Prompt:
Try running the npm install commands from a MSVS command prompt.
Find it at Start menu > Microsoft Visual Studio 201X > Visual Studio Tools > Open Visual Studio 201X Tools Command Prompt or run the <Program Files>\<VS dir>\Common7\Tools\VsDevCmd.bat from a command prompt.
and the installation proceeded flawlessly.