2

I've removed node modules and reinstall it but not solving the problem. If I run yarn add node-sass, the following error comes up in my terminal

gyp verb `which` failed     at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:153:21)
gyp verb `which` failed   stack:
gyp verb `which` failed    'Error: not found: python\n    at getNotFoundError (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:153:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\IT\\Desktop\\react-course-projects\\indecision-app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\IT\Desktop\react-course-projects\indecision-app\node_modules\node-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

node and npm version are

node- v 10.16.0
npm -v 6.9.0

1 Answer 1

3

Follow the step:

npm install -g node-gyp

npm install --global --production windows-build-tools
Sign up to request clarification or add additional context in comments.

4 Comments

the first command ran successfully but the second gave this error: npm ERR! Failed at the [email protected] postinstall script. then i ran yarn add node-sass again but still get the same error i posted above.
Can you use it: npm install --global --production [email protected]. Run on cmd administrator mode.
i used it and it also throw another error which i have provided below
I get this message when running 2nd command - npm WARN deprecated [email protected]: Node.js now includes build tools for Windows. You probably no longer need this tool. See github.com/felixrieseberg/windows-build-tools for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.