Node.js: Python not found exception due to node-sass and node-gyp

前端 未结 12 1346
余生分开走
余生分开走 2020-12-04 15:22

Suddenly in one of my jenkins environment build has started failing, while in local machine it seems to be working fine as i have python installed,

From the logs i w

12条回答
  •  萌比男神i
    2020-12-04 15:38

    The error message means that it cannot locate your python executable or binary.

    In many cases, it's installed at c:\python27. if it's not installed yet, you can install it with npm install --global windows-build-tools, which will only work if it hasn't been installed yet.

    Adding it to the environment variables does not always work. A better alternative, is to just set it in the npm config.

    npm config set python c:\python27\python.exe

提交回复
热议问题