There is an issue with Platformio where an environment variable set in Atom conflicts with npm/yarn commands and prevents you from using them as usual. This guide is for Cmdr, but the general fix (setting NODE_ENV in path in your terminal emulator’s startup config) should be able to be applied to any popular Console/Terminal emulator package.
Set CMDER_ROOT environment variable, either via Windows “Settings”, “Edit system environment variables” and creating a new key, or running:
set CMDER_ROOT=[Your root Cmdr install directory here, for me “C:/Cmder”]
In Cmder/Config/user-profile.cmd, set NODE_ENV var to “development”. My file looks like this:
:: use this file to run your own startup commands
:: use in front of the command to prevent printing the command
:: call “%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd”
:: set “PATH=%CMDER_ROOT%\vendor\whatever;%PATH%”
In Platformio-Terminal-IDE settings, set the default shell to cmd.exe (you may to have have enabled the “force default shell” option in ConEmu for this to work), and start it with the flag “/k %CMDER_ROOT%\vendor\init.bat”
Hope somebody gets some use out of this, took me a good while to figure out why it was breaking!