npm cannot find Python executable python

描述

执行npm install时报错:

1
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.

解决

1
npm --add-python-to-path='true' --debug install --global windows-build-tools
>