so this happened to me on windows recently. I fix it by following the following steps using a PowerShell with admin privileges:
npm install --global windows-build-toolswith administrative privilege. (in my case need restart – and restart without ask!!!)
reinstalling node modules or node-sass with
This is exactly the right answer.
npm install --global windows-build-toolsinstalls Python 2.7, and installs it globally (so you don’t have to re-install on a per-project basis). It fixes the “can’t install SASS” problem. NOTE: On windows, you must run your npm command prompt as “Administrator”.
Nov 22 ’18 at 22:14
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
- [Solved] yarn Install Module Error:check python checking for Python executable “python2” in the PATH
- Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x
- How to Solve Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor’
- [Solved] Module build failed: Error: Cannot find module ‘node-sass’
- error MSB8020: The build tools for v120 (Platform Toolset = ‘v120’) cannot be found. To build using
- Error: Can’t find Python executable “python”, you can set the PYTHON env variable. [Install the dependencies after pulling down the code]
- Node sass installation error [How to Solve]
- [Solved] Error:Node Sass version 6.0.0 is incompatible with ^4.0.0
- How to Solve Stack error: eacces: permission denied, MKDIR
- [Solved] Vue installs less Error: Failed to compile with 1 errors